Recently I noted that some applications are running on javaw
(not in java
). What is the difference between them and how can I run my Swing application on javaw
?
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.
.bat
script for example, and it will wait. However, when you manually start non-console programs from cmd.exe
, the cmd.exe
will not wait and return to command prompt immediately. Try it with notepad.exe
vs ping 8.8.8.8
–
Whitesmith java.exe
is the console app while javaw.exe
is windows app (console-less). You can't have Console
with javaw.exe
.
java.exe
is allowed to access its console. Running an applet from within a browser on Windows, for example, always uses java.exe
even if my Java Control Panel is set to Hide the console window or even Do not start a console window. –
Demetriusdemeyer 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.
.bat
script for example, and it will wait. However, when you manually start non-console programs from cmd.exe
, the cmd.exe
will not wait and return to command prompt immediately. Try it with notepad.exe
vs ping 8.8.8.8
–
Whitesmith The difference is in the subsystem that each executable targets.
java.exe
targets theCONSOLE
subsystem.javaw.exe
targets theWINDOWS
subsystem.
The javaw.exe command is identical to java.exe, except that with javaw.exe there is no associated console window
javaw
there is no associated console. The window isn't necessarily created (for example, when you run from an existing console window or completely in background). –
Bridewell © 2022 - 2024 — McMap. All rights reserved.