I searched to know the difference between java.exe
and javaw.exe
. I read through
Difference between Java.exe and Javaw.exe.
There it is stated that java.exe
is for console and javaw.exe
is for window application.
In some other post it is mentioned that console is not available in javaw
.
but I wonder when I run Tomcat server and see its process in process explorer I see javaw.exe
even though tomcat is a console application.
Best Answer
The java and javaw commands states
The
javaw
launcher displays a window with error information if it fails. In case of Tomcat you won't see Win32 console application running, similarly to launch Eclipse, javaw.exe is used.Example : Write the following code :
Step 1 :
C:\>java JavavsJavaw
(the command-line waits for the application response till it closes) Step 2 :C:\>javaw JavavsJavaw
(the application launches and the command line exits immediately and ready fornext command)