Sometimes if you try to use 'jps' and get the error message "jps: command not found error message" here is how you solve it
Step 1) Make sure you have installed a JDK, not a jre. In order to do that, you have to find out the directory where the jre is present. Mostly you can find it from the JAVA_HOME environment variable. A general rule of thumb is if the Java installation directory only has a 'jre' folder , then you might not have JDK installed.
Below is the output if you just have jre installed
$ cd $JAVA_HOME $ cd .. $ ls jre LICENSE THIRD_PARTY_README
On a linux you can install JDK by appending '-devel' to the installation package
$ sudo yum install java-1.7.0-openjdk-devel
Run 'ls' command again, you should see the below output
$ cd $JAVA_HOME $ cd .. $ ls bin include jre lib LICENSE tapset THIRD_PARTY_README
Step 2) Make sure the JDK_INSTALL_PATH/bin is in the classpath
Now if you try the 'jps' command, you should see the java processes running. On a Hadoop name node, you should see the below output
$jps JPS NameNode TaskTracker JobTracker