How to rename java.exe/javaw.exe process?

前端 未结 7 1120
故里飘歌
故里飘歌 2020-12-15 22:00

Always when I run java application it will display in Windows Task Manager is java.exe or javaw.exe. How to rename java.exe or javaw.exe process without wrapper by other pro

相关标签:
7条回答
  • 2020-12-15 22:28

    I believe your best bet is to use an ahead-of-time compiler like Excelsior JET to produce an executable. As they mention, you could also use a custom laucher or wrapper instead.

    0 讨论(0)
  • 2020-12-15 22:31

    If you are confused by looking at process names that are all the same (java.exe), try to use Process Explorer instead of Task Manager, and display the command line field. This way, you can see the class or jar arguments that differentiate one process from another.

    0 讨论(0)
  • 2020-12-15 22:37

    In easy way and badly style, you can copy java.exe or javaw.exe (execute file) and rename to new process name that you want.

    0 讨论(0)
  • 2020-12-15 22:37

    I suspect operating systems are generally not very fond of processes trying to rename their "image". If this was possible it would for instance be very easy for a virus to impersonate a legitimate process.

    By the way, you can also use "jps.exe" to list all Java processes and their corresponding main class. "jps.exe" is found in the bin directory of your Java installation.

    0 讨论(0)
  • 2020-12-15 22:44

    You could use jSmooth:

    JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications.

    0 讨论(0)
  • 2020-12-15 22:47

    There are mainly 2 approaches: one is as others described: using Launch4j, WinRun4J to create native Windows launchers.

    Another approach that seems better is to use Apache Procrun to wrap the java application as a Windows service. During the install service process, we can give the process an meaningful name such as OurApp.exe.

    All we need do is rename prunsrv.exe to OurApp.exe and replace every occurrence of prunsrv.exe in our install|start|stop|uninstall service scripts to MyApp.exe.

    See more from Using Apache Procrun to Rename Process Name of a Java Program in Windows

    0 讨论(0)
提交回复
热议问题