Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between java.exe, javaw.exe and jvm.dll

Tags:

java

jvm

What is the difference in running an application (for example, Eclipse) with java.exe, javaw.exe and jvm.dll? Also, does it make any difference in terms of performance?

like image 699
Manish Avatar asked Dec 14 '11 10:12

Manish


People also ask

What is the difference between Java exe and Javaw exe?

java.exe is the command where it waits for application to complete untill it takes the next command. javaw.exe is the command which will not wait for the application to complete. you can go ahead with another commands.

What is the difference between Java and Javaw?

The java and javaw tools start a Java™ application by starting a Java Runtime Environment and loading a specified class. The javaw command is identical to java, except that javaw has no associated console window. Use javaw when you do not want a command prompt window to be displayed.

What is Javaw exe used for?

This non-console version of the application launcher is used to launch java applications usually with graphical user interfaces (GUIs). These applications have windows with menus, buttons and other interactive elements.

Is Java exe JVM?

JIT is VM's prerogative, java.exe is not JVM, strictly speaking. It just launches it and feeds it with the code. By that logic, java.exe doesn't even feed the JVM code, that is done by the ClassLoader which is part of the JVM.


Video Answer


1 Answers

  • jvm.dll is the actual Windows implementation of the JVM (or better, the main entry point). C or C++ applications can use this DLL to run an embedded Java runtime, and that would allow the application to interface directly with the JVM, e.g. if they want to use Java for its GUI.

  • java.exe is a wrapper around the DLL so that people can actually run Java classes without the need for a custom launcher application. It is a Win32 Console application, so Windows will open a fresh Command Prompt window if the exe is not run from a batch file.

  • javaw.exe is a wrapper like java.exe, but it is a Win32 GUI application. Windows doesn't have to open a Command Prompt window, which is exactly what you want to run a GUI application which opens its own windows.

EDIT: These shouldn't make any difference in performance except for the overhead of process creation and initialization.

The most important thing: it should't matter; if you are worrying about this you might actually want to keep Java running instead of launching it hundreds of times.

like image 155
JBert Avatar answered Oct 04 '22 14:10

JBert