The /usr/bin/jvisualvm startup script (around line 13) is looking for: 
/usr/lib/jvm/java-6-openjdk :
sv@ubu:~$ grep -n /usr/lib/jvm /usr/bin/jvisualvm 
13:for j in /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun; do

And, assuming the openjdk-6-jdk package is already installed (sudo apt-get 
install openjdk-6-jdk), there is no link in /usr/lib/jvm for 
/usr/lib/jvm/java-6-openjdk:
sv@ubu:~$ ls /usr/lib/jvm
java-1.6.0-openjdk-amd64  java-6-openjdk-amd64  java-6-openjdk-common

#Here's what worked for us:
So, to match things up and make the program work, simply create a symlink:
sv@ubu:~$ sudo ln -s /usr/lib/jvm/java-6-openjdk-amd64 
/usr/lib/jvm/java-6-openjdk

Note: I am using Ubuntu 12.04 64-bit version, so you may have to adjust
your symlink accordingly.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/657048

Title:
  visualvm fails to launch because it can't find jdk: "Cannot find java.
  Please use the --jdkhome switch"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/657048/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to