jvmtop icon indicating copy to clipboard operation
jvmtop copied to clipboard

Issue using with openjdk

Open cbrdy opened this issue 8 years ago • 2 comments

@patric-r, I'm seeing this error with openjdk. /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64/jre seems to be no JDK! but when I manually set the path and run from command line without using jvmtop.sh, it doesnt show any process running (nor even the jvmtop process itself). All I see is shown below. I also have tomcat process running but it doesnt show that too.

 JvmTop 0.8.0 alpha - 13:29:12,  amd64,  1 cpus, Linux 3.10.0-51, load avg 0.00
 http://code.google.com/p/jvmtop

  PID MAIN-CLASS      HPCUR HPMAX NHCUR NHMAX    CPU     GC    VM USERNAME   #T DL

cbrdy avatar Apr 14 '17 17:04 cbrdy

Hello! I think this is because jre is not "jdk", you need set JAVA_HOME = /path/to/java/jdk (not jre). If you look /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64/, you find only jre.

zls1988 avatar Apr 23 '17 22:04 zls1988

sh-4.4# $JAVA_HOME/bin/java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15.0.1+9, mixed mode, sharing)
sh-4.4# ./jvmtop.sh
 seems to be no JDK!

After checking the shell script, it seems that tools.jar is missing:

TOOLSJAR="$JAVA_HOME/lib/tools.jar"                    
                                                       
if [ ! -f "$TOOLSJAR" ] ; then                         
        echo "$JAVA_HOME seems to be no JDK!" >&2      
        exit 1                                         
fi                                                     
sh-4.4# cd $JAVA_HOME\lib
sh-4.4# ls | grep tools
sh-4.4#

https://stackoverflow.com/questions/53707666/how-to-get-tools-jar-for-openjdk-11-on-windows It seems jvmtop only works until jdk8.

cdalexndr avatar Jan 21 '21 18:01 cdalexndr