JDK-5100617 : Java launcher should allow option to specify alternate process name
  • Type: Enhancement
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2004-09-11
  • Updated: 2008-02-19
  • Resolved: 2004-09-22
Related Reports
Relates :  
Description
When running multiple Java applications on a system you end up with
a bunch of processes named 'java' which makes it difficult to figure
out which process belongs to which application. This is especially true
on Windows and the Mac where the GUI "process" tools don't show command
line arguments (which are often useful in identify which java is which).

It would be useful to have an option to the java launcher to have it use
an alternate name (argv[0]) for the process that is the JVM.

For example 

java -Xpname:myjava

 

Comments
EVALUATION While the request has some utility, it would be somewhat complicated to implement since a re-exec may be necessary to reset the kernel data structures which hold the process name. However, the current implementation of the launcher, it should be possible to write a C wrapper program that set argv[0] to something distinct from the executable name. Closing as will not fix. ###@###.### 2004-09-22
22-09-2004