使用java.exe执行静默模式 [英] Silent mode execution with java.exe

查看:498
本文介绍了使用java.exe执行静默模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有办法执行java.exe作为后台进程(静默模式执行)

I would like to know if there is a way to execute the "java.exe" as a background process (silent mode execution)

Ex:java -cp 。 MyClass arg1

Ex: java -cp . MyClass arg1

我想将上述语句作为后台进程运行,无需打开命令窗口

I want to run the above statement as a background process , without opening command window

推荐答案

在Windows下,使用 javaw.exe 而不是 java.exe 。请参阅此处以获取链接,相关位复制到此处:

Under Windows, use javaw.exe instead of java.exe. See here for link, relevant bit copied here:


javaw 命令与 java <相同/ code>,但 javaw 除外,没有关联的控制台窗口。当您不希望出现命令提示符窗口时,请使用 javaw 。但是,如果由于某种原因启动失败, javaw 启动器将显示一个包含错误信息的对话框。

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.

这篇关于使用java.exe执行静默模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆