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

前端 未结 2 1811
暖寄归人
暖寄归人 2020-12-08 14:08

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?

相关标签:
2条回答
  • 2020-12-08 14:33
    • 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.

    0 讨论(0)
  • 2020-12-08 14:46
    • java.exe - run a Java program (need to specify classes and/or JARs) starting from specified class containing main() method.

    • javaw.exe - as above but does not create a Windows command prompt (suitable for Swing programs that do not need a console).

    • jvm.dll - this is not a runnable but a library. Probably used by both programs above.

    0 讨论(0)
提交回复
热议问题