jps not working

2019-04-19 01:29发布

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.

9条回答
小情绪 Triste *
2楼-- · 2019-04-19 01:52

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
查看更多
Deceive 欺骗
3楼-- · 2019-04-19 01:52

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

查看更多
淡お忘
4楼-- · 2019-04-19 01:52

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

查看更多
看我几分像从前
5楼-- · 2019-04-19 01:53

When I try jps I got

jps: command not found...

Because I did not install jps

and I solved by installing jdk.

yum install jdk
查看更多
Rolldiameter
6楼-- · 2019-04-19 01:54

This command also worked me:

alias jps='<your JDK path>/bin/jps'
查看更多
一纸荒年 Trace。
7楼-- · 2019-04-19 02:01

You just have to put $JAVA_HOME/bin in your $PATH variable.

查看更多
登录 后发表回答