我想知道是否有办法将“java.exe”作为后台进程执行(静默模式执行)
例如:java -cp。我的类 arg1
我想在不打开命令窗口的情况下将上述语句作为后台进程运行
最佳答案
在 Windows 下,使用 javaw.exe
而不是 java.exe
。参见 here对于链接,相关位复制在这里:
The
javaw
command is identical tojava
, except that withjavaw
there is no associated console window. Usejavaw
when you don't want a command prompt window to appear. Thejavaw
launcher will, however, display a dialog box with error information if a launch fails for some reason.
关于java - 使用 java.exe 的静默模式执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2902656/