jvmtop
jvmtop copied to clipboard
/usr/lib/jvm/java-11-openjdk-amd64/bin seems to be no JDK!
I have java jdk & jre installed on Ubuntu 20.04, and I added:
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
to jvmtop.sh (line 10), as I saw in a tutorial.
Im asuming this counts as having a valid JDK environment path, but even if it doesn't, I already tried everything I mention here: https://askubuntu.com/questions/1248311/running-jvmtop-profile-the-java-home-environment-variable
However I get this message:
/usr/lib/jvm/java-11-openjdk-amd64/bin seems to be no JDK!
oddly enough, the path in the error seems to include bin, even though I only specified it up to java-11-openjdk-amd64
.
I did nothing more and nothing less than what I mentioned. Am I missing something?
Got it to work by switching from java 11, to java 8. But how do you exit the profiling mode? Edit: well, I guess just disconnecing from ubuntu is one way.
I can reproduce this problem using a Ubuntu machine with only Java 11 installed.
This is likely because tools.jar
was removed in JDK 9. Not sure if there's a fix to this problem.
I get the same problem with openjdk 17: /Users/user01/Library/Java/JavaVirtualMachines/openjdk-17.0.2/Contents/Home seems to be no JDK!
There is no solution for this?
If I run any Java app with a newer version and run jvmtop
on Java 8 I get this result:
These are IntelliJ and some Gradle processes running on Java11:
388753 inCompileDaemon [ERROR: Could not attach to VM]
388828 inCompileDaemon [ERROR: Could not attach to VM]
389039 inCompileDaemon [ERROR: Could not attach to VM]
386926 ap.GradleDaemon [ERROR: Could not attach to VM]
383163 ellij.idea.Main [ERROR: Could not attach to VM]
On Java 8 they look fine but IntelliJ probably runs on their own JDK:
391975 m.jvmtop.JvmTop 76m 7015m 22m n/a 0.12% 0.00% O8U33 _ 25
390917 ap.GradleDaemon 597m 1820m 239m n/a 0.06% 0.00% O8U33 _ 37
391314 inCompileDaemon 227m 1820m 135m n/a 0.06% 0.00% O8U33 _ 16
391376 inCompileDaemon 174m 1820m 145m n/a 0.00% 0.00% O8U33 _ 15
391256 inCompileDaemon 231m 1820m 154m n/a 0.00% 0.00% O8U33 _ 17
392478 ellij.idea.Main [ERROR: Could not attach to VM]