I installed Oracle JDK from the webupd8team/java
PPA, and then installed the visualvm
package. When starting visualvm
, I get the following error message:
[beni:~]$ visualvm
No jdkhome found
My $JAVA_HOME
is set correctly to /usr/lib/jvm/java-7-oracle
.
Also, when starting visualvm
with the jdkhome
property set, I get the same error:
[beni:~]$ visualvm --jdkhome $JAVA_HOME
No jdkhome found
visualvm
checks the following three directories for a JDK:/usr/lib/jvm/java-7-openjdk-$ARCH
/usr/lib/jvm/java-8-openjdk-$ARCH
and/usr/lib/jvm/default-java
From the
/usr/bin/visualvm
start script:So make
/usr/lib/jvm/default-java
a symlink to$JAVA_HOME
, andvisualvm
will find the right JDK.In my case even the symlink of default-java didn't fixed the problem. To fix, I did:
Edited jvisualvm and add any "trash" into
jdkhome
variable$ sudo vi /usr/bin/jvisualvm
jdkhome=/tmp
Then started the program passing parameter:
/usr/bin/jvisualvm --jdkhome /usr/lib/jvm/myJava7
Note: today (2016), with my version is working only with java7
Update:now, in 2017, using version 1.3.8, it's working with Java 8. But I needed to add
visualvm_jdkhome=/tmp
, in /usr/bin/visualvm