See my comments (and earlier ones from others) in bug #577958.

I suspect that DBooth did an upgrade to Lucid like me. This would mean
you'd have the Sun JDK and the Lucid version of the visualvm package
which won't detect the Sun JDK properly if the OpenJDK JDK is not
installed (due to the script issues discussed earlier here).

There are actually 3 alternatives:

(i) Switch to the OpenJDK fully. Install the OpenJDK JDK (package
default-jdk, which sorts out update-alternatives for you). Then
jvisualvm will work OK (you'll be running the OpenJDK one), but you get
the Fluid errors like in bug #577958.

(ii) As specified in bug #577958, you can switch to the proper Sun
jvisualvm by running /usr/lib/jvm/java-6-sun/bin/jvisualvm explicitly,
or changing the /usr/bin/jvisualvm symlink to permanently point to this.

(iii) Do what DBooth did, which runs the OpenJDK jvisualvm, but with the
Sun JDK backend. With this, you get the *same* Fluid error as #577958
(but, as with my comments there, this doesn't seem to affect the ability
to link to running/launched Java apps.).

One possible fix for *this* bug is therefore to ensure that a Sun JDK
package ensures that an update-alternatives entry for jvisualvm exists
to automatically do (ii) above, so that you're either running the full
Sun suite or the full OpenJDK suite (and built into update-java-
alternatives as well). And then you wouldn't have to worry about all the
checking in the OpenJDK jvisualvm script. Of course, this might not be
considered valid if the devs want to allow the case of running the
OpenJDK jvisualvm frontend with a Sun JDK backend.

-- 
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"

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

Reply via email to