微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用java.exe执行静默模式

我想知道是否有办法执行“ 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.

原文地址:https://www.jb51.cc/java/122361.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐