In general, the GUI program uses javaw.exe. The console uses java.exe.
Baidu encyclopedia content:
1、java.exe:
Run Java program
2、javac.exe:
Compile to generate the. Class file.
32.16javaw.exe:
In contrast to the Java command, a console window is displayed and maintained when you run the Java command,
Information in the program can be output in the console through system. Out,
Java W is mostly used to run GUI programs
The following is a network Abstract:
Appendix 1:
Both applications can run your program, which is very similar, but there is an important difference.
The system runs, while Java W does not.
The console is almost compiled into plain text. For example, if you use Java W to run all the printed statuses
Printed. The useful information you print in the program is the same as the error information.
Therefore, if you choose which one to use:
Java is compiled based on plain text.
If it is graphical, it can be printed as plain text at any time in Java.
If you are checking for errors, use Java.
If the program is purely graphical and you need to increase the speed, use javaw.
Appendix 2:
Java.exehas a basic difference with java.exe. When you double-click to start the program, double-click java. EXE
A black DOS window pops up, and double-click javaw. EXE does not change.
The root cause is that Java. EXE is a command line program,
The program entry is the main () function of C language (not the public static void main of Java );
Javaw. EXE is a Windows window program,
The program entry is the winmain () function in C language.
Due to the different features above, there are two other differences:
1) The program started by Java can display the output content of system. Out. Print () in the black DOS window. Javaw
It cannot be displayed.
2) When called in batch processing, Java execution is completed, rather than Java W execution results.
The difference is that javaw does not display the command line parameter help prompt.