jps not working
Solution 1
You just have to put $JAVA_HOME/bin
in your $PATH
variable.
Solution 2
That is common issue. The reason of this problem is that open jdk package just contains jre in CentOs. Therefore, jps ise not preinstalled. In order to solve this problem and develop java applications, open jdk devel packages must be installed.
Firstly, list developer packages and install suitable one with the commands shown belows. Pick the most relevant version from the list in 1
to use with 2
.
yum list java*devel*
sudo yum install java-<version>-openjdk-devel.x86_64
Solution 3
jps is not part of the openjdk. you have to install it by using the command
for java 7 - sudo yum install java-1.7.0-openjdk-devel
for java 8 - sudo yum install java-1.8.0-openjdk-devel
Solution 4
Add JAVA_HOME to PATH variable in bashrc file if you are using linux based OS.
vim ~/.bashrc
export JAVA_HOME=/opt/jdk1.8.0_72/
export PATH=$JAVA_HOME/bin:$PATH
source ~/.bashrc
Solution 5
check the installation directory of java i.e $JAVA_HOME
then make a sym link i.e
ln -s $JAVA_HOME/bin/jps /usr/bin/jps
Related videos on Youtube
Phelodas
Updated on July 31, 2022Comments
-
Phelodas almost 2 years
I have installed java-1.6.0-openjdk-devel.
$java -version java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.3) (rhel-1.48.1.11.3.el6_2-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
when typing jps into command prompt
$jps -bash: jps: command not found
I do not believe it is an openjdk error because I have used it around 6 months back on the same system and it worked fine. Also, it works fine on my laptop.
-
Ramanqul Buzaubak almost 12 yearsDid you set JAVA_HOME? And where you did it?
-
-
Drew Rush about 9 yearsJPS isn't located in that directory--or anywhere--in the openjdk I just installed.