Comment 8 for bug 577958

Revision history for this message
Ekr (ekr) wrote :

Same problem here: the mentioned JFluid problem and failure to connect to
a locally running Java app later.

Found a workaround. I installed sun-java6-* like suggested in the post:
http://ubuntuforums.org/showpost.php?p=9320525&postcount=1
and manually changed (soft link) /usr/bin/jvisualvm to sun's jvisualvm:

cd /usr/bin
sudo unlink jvisualvm
sudo ln -s ../lib/jvm/java-6-sun/bin/jvisualvm jvisualvm

Before doing that I tried two other approaches:
(1) running jvisuavm with --jdkhome /usr/lib/jvm/java-6-sun
(2) setting sun's java to be default jvm (with update-java-alternatives)
and reinstalling visualvm.
None of that worked (visualvm still opened
with openjdk). Thus these appear to be bugs in ubuntus' lucid distro:
the link to /usr/bin/jvisualvm is not updated on change of jvm and
the jdkhome option does not seem to work correctly.