Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Java 11 (no tools.jar existent) #119

Open
philipp-eliasch opened this issue Jun 3, 2019 · 5 comments
Open

Issue with Java 11 (no tools.jar existent) #119

philipp-eliasch opened this issue Jun 3, 2019 · 5 comments

Comments

@philipp-eliasch
Copy link

philipp-eliasch commented Jun 3, 2019

@patric-r,
I'm seeing this error with openjdk:
[user@server jvmtop-0.8.0]$ ./jvmtop.sh /usr/lib/jvm/java-11-openjdk-11.0.3.7-0.el7_6.x86_64 seems to be no JDK!

It has something to do with the tools.jar
[user@server jvmtop-0.8.0]$ grep -3 seems jvmtop.sh
TOOLSJAR="$JAVA_HOME/lib/tools.jar"

if [ ! -f "$TOOLSJAR" ] ; then
echo "$JAVA_HOME seems to be no JDK!" >&2
exit 1
fi

tools.jar which seems to be a prerequisite for running jvmtop was removed with java 9, see https://www.reddit.com/r/javahelp/comments/765mwr/installed_jdk_9_and_my_toolsjar_is_missing/

[user@server jvm]$ find /usr/lib/jvm/* -type f -name tools.jar
[user@server jvm]$

So it can't be used at least with OpenJDK or Amazon Corretto in Version 11.
Any ideas?

@patric-r
Copy link
Owner

patric-r commented Jun 3, 2019

Thanks for the hint, I'll have a look as soon as I have more time again. Any suggestions how to solve this are welcome.

@philipp-eliasch
Copy link
Author

philipp-eliasch commented Jun 4, 2019

No suggestion on how to solve, but found a good workaround.

[user@server ~]$ top -H -p 7809 # where 7809 is the pid of jvm

Java 11 shows thread names. Java 8 shows all thread names as "java" which is not really helpful.
Tested with Oracle OpenJDK and Amazon Corretto OpenJDK.
Source: https://backstage.forgerock.com/knowledge/kb/article/a39551500

@andredasilvapinto
Copy link

jvmtop is broken in other ways with regards to java >= 9. For example, it relies on management-agent.jar ( https://github.com/tellapart/jvmtop/blob/master/src/com/jvmtop/openjdk/tools/LocalVirtualMachine.java#L350-L367 ) which was removed here: https://www.oracle.com/technetwork/java/javase/9-removed-features-3745614.html#JDK-8043939

@pditommaso
Copy link

+1 for this. I think it would require to use the new module system and repackage it. Some info here https://stackoverflow.com/a/52645592

@bor8
Copy link

bor8 commented Apr 30, 2020

I found a nice fork for Java 11 and created a small guide with a download: #109 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants