myeclipse also uses jdk but javaw.exe. This executable file is used to compile java into class files. Tomcat is a class file compiled by calling java.exe to execute myeclipse and calling javaw.exe.
Because the environment variable you configure is the path of jdk, if you configure the environment variable, it will not go to jre. If you install jre and configure the environment variable, it will go back to find jre’s java.exe
This depends on your configuration. If you only configure JRE, then it will be started using java.exe in JRE.
The functions of java.exe and javaw.exe are the same, except that the java command line program has a standard input and output stream and will print the content to the console. And javaw.exe does not print information. So you can also start myeclipse using java.exe, but a black box command line will be displayed on the desktop, and closing the command line will close myeclipse.
This is based on the needs of the program. Tomcat does not have an interface, so it needs a place to display startup information, so naturally java.exe is used. Eclipse has a graphical interface and naturally does not require a command line to display information.
If the script that starts tomcat does not specify where java is, then find the first java from the path configured in the PATH, such as the environment variable of my computer above: C:ProgramDataOracleJavajavapath There is a shortcut to java in this directory. jre8, so even if my environment variables include: C:Program Files (x86)Javajdk1.7.0_17/bin, my default java is still jre8's java.
But if the absolute path of the java program is specified in tomcat, then java will not be found in the environment variables, it will be the java you specified.
The above is to answer the question of which java.exe to use. Myeclipse uses javaw.exe because if you directly execute java.exe, a black command line window will appear. This is called the console window. The content of the standard output will be output to this window. , if it is javaw.exe, the console window will not appear and is generally used to run GUI programs.
If anything is inaccurate, please correct me. Please don’t step on me. I am very fragile at heart. Thank you. . .
1. It’s because you set the path in the environment variable, which points to the bin directory in the JDK. 2. When calling java.exe, a console will appear. However, MyEclipse has its own interface and does not require a system console to appear. When calling javaw.exe, no console will appear. 3. Tomcat can call both java.exe and javaw.exe. Click Tomcat7.exe to call java.exe and a console will appear. Click Tomcat7w.exe to call javaw.exe, which will have its own interface and no control will appear. tower.
myeclipse also uses jdk but javaw.exe. This executable file is used to compile java into class files.
Tomcat is a class file compiled by calling java.exe to execute myeclipse and calling javaw.exe.
Because the environment variable you configure is the path of jdk, if you configure the environment variable, it will not go to jre. If you install jre and configure the environment variable, it will go back to find jre’s java.exe
This depends on your configuration. If you only configure JRE, then it will be started using java.exe in JRE.
The functions of java.exe and javaw.exe are the same, except that the java command line program has a standard input and output stream and will print the content to the console. And javaw.exe does not print information.
So you can also start myeclipse using java.exe, but a black box command line will be displayed on the desktop, and closing the command line will close myeclipse.
This is based on the needs of the program. Tomcat does not have an interface, so it needs a place to display startup information, so naturally java.exe is used. Eclipse has a graphical interface and naturally does not require a command line to display information.
Thank you, this is all because of environment variables. The so-called environment variables are where the program looks for the default command.
Looking at your question, I can see that you are using windows. Execute echo %PATH% in cmd,
If the script that starts tomcat does not specify where java is, then find the first java from the path configured in the PATH, such as the environment variable of my computer above: C:ProgramDataOracleJavajavapath There is a shortcut to java in this directory. jre8, so even if my environment variables include: C:Program Files (x86)Javajdk1.7.0_17/bin, my default java is still jre8's java.
But if the absolute path of the java program is specified in tomcat, then java will not be found in the environment variables, it will be the java you specified.
The above is to answer the question of which java.exe to use. Myeclipse uses javaw.exe because if you directly execute java.exe, a black command line window will appear. This is called the console window. The content of the standard output will be output to this window. , if it is javaw.exe, the console window will not appear and is generally used to run GUI programs.
If anything is inaccurate, please correct me. Please don’t step on me. I am very fragile at heart. Thank you. . .
1. It’s because you set the path in the environment variable, which points to the bin directory in the JDK.
2. When calling java.exe, a console will appear. However, MyEclipse has its own interface and does not require a system console to appear. When calling javaw.exe, no console will appear.
3. Tomcat can call both java.exe and javaw.exe. Click Tomcat7.exe to call java.exe and a console will appear. Click Tomcat7w.exe to call javaw.exe, which will have its own interface and no control will appear. tower.