首页 > 编程语言 > 详细

java & javaw

时间:2020-09-26 19:01:48      阅读:65      评论:0      收藏:0      [点我收藏+]

  

What is the difference between java and javaw?

That‘s because Windows has this annoying habit of starting an actual Terminal (which should not even be called a "Terminal"...) in the foreground whenever you start a program with java -cp .... As almost nobody wants that, javaw is the choice to make that annoying window disappear. 

 

The java tool launches a Java application. It does this by starting a Java runtime environment, loading a specified class, and invoking that class‘s mainmethod.

java: Java application executor which is associated with a console to display output/errors

 

 

The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don‘t want a command prompt window to appear.

 

java: Java application executor which is associated with a console to display output/errors

javaw: (Java windowed) application executor not associated with console. So no display of output/errors. It can be used to silently push the output/errors to text files. It is mostly used to launch GUI-based applications.

 

java.exe is associated with the console, whereas javaw.exe doesn‘t have any such association. So, when java.exe is run, it automatically opens a command prompt window where output and error streams are shown.

 

java & javaw

原文:https://www.cnblogs.com/dissipate/p/13734797.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!