如何更改Java应用程序的进程名称
执行 Java 应用程序时,为其指定的进程名称通常是 java.exe 或 javaw.exe。但是我怎样才能让它通过 window.app 中我的应用程序的名称来调用呢? 我无法使用 http://launch4j.sourceforge.net/ 因为我想在服务器上运行这个 jar 。
when executing a Java application the process name given to it is usually java.exe or javaw.exe. But how can I make it be called by the name of my application in window.
I can't use http://launch4j.sourceforge.net/ because I want to run this jar on server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 jsmooth 制作 exe,为您提供创建单独进程的选项
make exe with jsmooth , that provide you option to create separate process
将您的 java.exe 复制为 customName.exe(并将其放在 java.exe 所在的同一位置)并以
customName com.something.something.MyClass
运行您的程序
而不是
java com.something.something.MyClass
Copy your java.exe as customName.exe (and put it in the same location where your java.exe is) and run your program as
customName com.something.something.MyClass
instead of
java com.something.something.MyClass