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 programming languages.
-
Easy for identify when have many java applications are running in the same time – Fuangwith S. Nov 05 '08 at 17:01
-
1As cool as that sounds, if you were to run java Foo and java Bar from the command line, wouldn't they be running in the same JVM and thus in the same java.exe ? – SCdF Nov 05 '08 at 18:11
-
6Running at the same time does not necessarily mean running in the same JVM. – Spencer Kormos Nov 05 '08 at 18:14
7 Answers
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.

- 83,368
- 10
- 76
- 104
You could use jSmooth:
JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications.

- 96,212
- 12
- 54
- 76
-
It's just a wrapper for the underlying jar, that is still loaded unto a JVM. – Mordechai Feb 26 '13 at 09:11
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.

- 5,654
- 8
- 37
- 41
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.

- 6,651
- 1
- 27
- 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.

- 188,989
- 46
- 291
- 292
-
The second link has a convenient list of free and non-free java executable wrappers. – sk. Nov 05 '08 at 17:11
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

- 11
- 1
Old thread but if anyone still wonders...If you use the javapackager
with the -name MyTestApp -native image
flags it will generate a native runtime image with the executable MyTestApp.exe
for you and this is how it will look like in the Task Manager with the default icon:
Now, packaging as a Self-Contained Application may or may not be what you want. It has both benefits and drawbacks: https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html#A1307236

- 611
- 4
- 15