FULL PRODUCT VERSION :
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
The jps output is wrong on Windows. It cuts away the drive letter and everything trailing a blank in the path.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start CMD.exe, enter the following:
C:\>"C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar"
C:\>"D:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar"
C:\>jps
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
12345 C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12346 D:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12347 Jps
ACTUAL -
Without any options given to JPS:
12345 Program
12346 Program
12347 Jps
(which is totally useless!)
With -m given:
12345 Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12346 Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12347 Jps
(which is missing the drive letter, an such hides the distinction between C: and D:, and such is rather useless)
With -ml given:
12345 C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12346 C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12347 sun.tools.jps.Jps -ml
Which solves the problem, but mixes up class names and JAR names.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
There is no error message provided.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Always provided -lm to find out the path of the executed JAR file, and ignore the fact that it mixes in class names.
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
The jps output is wrong on Windows. It cuts away the drive letter and everything trailing a blank in the path.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start CMD.exe, enter the following:
C:\>"C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar"
C:\>"D:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar"
C:\>jps
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
12345 C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12346 D:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12347 Jps
ACTUAL -
Without any options given to JPS:
12345 Program
12346 Program
12347 Jps
(which is totally useless!)
With -m given:
12345 Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12346 Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12347 Jps
(which is missing the drive letter, an such hides the distinction between C: and D:, and such is rather useless)
With -ml given:
12345 C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12346 C:\Program Files\Java\jdk1.6.0_23\demo\jfc\Metalworks\Metalworks.jar
12347 sun.tools.jps.Jps -ml
Which solves the problem, but mixes up class names and JAR names.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
There is no error message provided.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Always provided -lm to find out the path of the executed JAR file, and ignore the fact that it mixes in class names.
- duplicates
-
JDK-7012002 SA: JPS output is wrong on Windows
-
- Open
-