Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335551

Summary: jps shows Eclipse process only with PID but without name
Product: [Eclipse Project] Equinox Reporter: Michael Meß <michael.mess>
Component: LauncherAssignee: Project Inbox <equinox.launcher-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, dino.lupo, eclipse.dserodio, ob1.eclipse, prakash
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug
Attachments:
Description Flags
Multiple Gradle Daemon created after creating Test project none

Description Michael Meß CLA 2011-01-27 05:30:36 EST
The java command jps shows the Eclipse process only with PID but without a process name. 

Example jps output: 

{{{
18250 Jps
18130 ASMain
11742 
17581 JConsole
}}}

Eclipse has the PID 11742 here.

Expected result: 

{{{
18250 Jps
18130 ASMain
11742 Eclipse
17581 JConsole
}}}

With the name displayed it is obvious that the process with PID 11742 is a running Eclipse.

Thus when searching and killing any hanging/garbage java processes, it is more unlikely to kill an Eclipse process by accident.
Comment 1 Oleg Besedin CLA 2011-01-27 11:38:31 EST
On Windows names show up in TaskManager, but not in jps.

From the jps description, names are taken from the java launcher and based on the class name passed to the main method.
Comment 2 Andrew Niefer CLA 2011-03-18 15:34:36 EDT
I'm not sure what to do to fix this:

http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jps.html
If the target JVM is started with a custom launcher, the class name (or JAR file name) and the arguments to the main method will not be available. In this case, the jps command will output the string Unknown for the class name or JAR file name and for the arguments to the main method.
Comment 3 Daniel Serodio CLA 2011-06-07 12:53:15 EDT
(In reply to comment #2)
> I'm not sure what to do to fix this:
> 
> http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jps.html
> If the target JVM is started with a custom launcher, the class name (or JAR
> file name) and the arguments to the main method will not be available. In this
> case, the jps command will output the string Unknown for the class name or JAR
> file name and for the arguments to the main method.

Should we file a bug report on jps then?
Comment 4 Michael Meß CLA 2013-03-22 07:23:39 EDT
With Eclipse Version: 3.8.2 - Build id: M20130131-0800 
and java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)

I get now:


jps
7662 Jps
5820 org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar


That's OK for me, because now I know that 5820 is the Eclipse process.
Of course it could be nice if there is just the name Eclipse like for other processes which have their names (ASMain or JConsole) displayed.

Does anybody still have the problem?

I think that it should be somehow possible to set the command name of the JVM to "Eclipse" or whateverelse using a custom launcher.
Perhaps this is just a property or something like that.

Otherwise I would suggest to close the issue.
Comment 5 Dino Lupo CLA 2015-10-08 05:10:34 EDT
Created attachment 257150 [details]
Multiple Gradle Daemon created after creating Test project

I opened a workspace with some Gradle projects that have a gradle.properties file with 

org.gradle.jvmargs=-Xms64m -Xmx64m 

content.

Then I created a new gradle project "test" to show that Eclipse starts a new Daemon as shown in the terminal.
Comment 6 Dino Lupo CLA 2015-10-08 05:11:19 EDT
Sorry wrong bug ID :(
Comment 7 Eclipse Genie CLA 2019-01-16 19:10:57 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Lars Vogel CLA 2019-09-24 13:55:04 EDT
This bug was marked as stalebug a while ago. Marking as worksforme.

If this report is still relevant for the current release, please reopen and remove the stalebug whiteboard tag.