The Java JPS tool does not work … here is a solution to the problem.
The Java JPS tool does not work
I’m trying to use the JPS tool (Java Process Monitoring Tool).
I have Oracle jdk1.6 on my ubuntu-12.04 machine
My configuration.
$ java -version
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
$ echo $PATH
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/bin:/usr/bin/java:/usr/lib/jvm/jdk1.6.0_39
$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
JAVA_HOME="/usr/lib/jvm/jdk1.6.0_39"
$ jps
The program 'jps' can be found in the following packages:
* openjdk-6-jdk
* openjdk-7-jdk
Try: sudo apt-get install <selected package>
I want to use oracle-jdk instead of open-jdk.
Solution
Use this command
export PATH=$PATH:/usr/lib/jvm/jdk1.6.0_39/bin
Then try the jps
command in the same shell.