Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change java process description in windows task manager [duplicate]

Is there a command line argument to set the title that JVM reports to the windows task manager? All my java processes only show up as ‘javaw.exe’ with description ‘Java(TM) Platform SE binary’. It would be great, if I could set some -param="This is eclipse" e.g. so that I can easily tell them apart. It would prevent me from frequently killing my IDE instead of, e.g., tomcat.

like image 728
Matthias Ronge Avatar asked Nov 08 '12 13:11

Matthias Ronge


2 Answers

You could hack the JVM binary or u could implement a small binary app to invoke the JVM rather than a batch file; beyond this there's not really a pure java way to do it!

like image 83
robert Avatar answered Sep 21 '22 07:09

robert


The process in the description column of the Windows task manager is taken from the product name in the version resource that is statically compiled into the executable. An executable has no way to set this description as runtime.

You only option is to create a native wrapper executable that creates a version resource with a configurable name.

exe4j does that, for example. Disclaimer: My company develops exe4j.

like image 21
Ingo Kegel Avatar answered Sep 23 '22 07:09

Ingo Kegel