加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

使用java.exe执行静默模式

发布时间:2020-12-14 05:30:35 所属栏目:Java 来源:网络整理
导读:我想知道是否有办法执行“ java.exe”作为后台进程(静默模式执行) 例如:java -cp. MyClass arg1 我想以上述语句作为后台进程,不用打开命令窗口 解决方法 在 Windows下,使用javaw.exe而不是java.exe.请参阅 here链接,相关位复制在这里: The javaw command i
我想知道是否有办法执行“ java.exe”作为后台进程(静默模式执行)

例如:java -cp. MyClass arg1

我想以上述语句作为后台进程,不用打开命令窗口

解决方法

在 Windows下,使用javaw.exe而不是java.exe.请参阅 here链接,相关位复制在这里:

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. The javaw launcher will,however,display a dialog box with error information if a launch fails for some reason.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读