[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
Ubuntu Server 12.04 LTS x64, fully updated as of 2014-07-03, and still no support for Oracle Java 8 x64 installed through https://launchpad.net/~webupd8team/+archive/java. We're talking about a literal shame here on (j)visualvm's part for not supporting its own owner. Wake up, ffs, and quit hardcoding ! -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
So it's just a missing dependency? -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
Aha, it has path to openjdk hardcoded. And it doesn't support oracle jdk -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
I solved it using 'sudo apt-get install openjdk-6-jdk' in Ubuntu 12.04.1 LTS -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
I had the same problem in u12.04 and the patch in #16 fixed it for me. Thanks Dmitriy! -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
The package in the release of Ubuntu 12.04 LTS still has this bug. Check out my patch. ** Patch added: Patch to /usr/bin/jvisualvm script https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/657048/+attachment/3163376/+files/jvisualvm.diff -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
** Patch removed: Patch to /usr/bin/jvisualvm script https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/657048/+attachment/3163376/+files/jvisualvm.diff ** Patch added: Patch to /usr/bin/jvisualvm script https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/657048/+attachment/3163566/+files/jvisualvm.diff -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
-- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
** Patch added: Patch to /usr/bin/jvisualvm script https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/657048/+attachment/3163581/+files/jvisualvm.diff -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
** Patch removed: Patch to /usr/bin/jvisualvm script https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/657048/+attachment/3163566/+files/jvisualvm.diff -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
I had this problem as well with visualvm version 1.3.2-0ubuntu2. As a workaround I remove the empty directory /usr/lib/jvm/java-6-openjdk and created a symlink in it's place that points to /usr/lib/jvm/java-6 -openjdk-amd64. It seems strange that the package openjdk-6-jdk would install an empty directory, maybe they forgot to make it a symlink? -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
I have installed openjdk-7 and openjdk-6 on Ubuntu 12.04 LTS And have same problem. specifying --jdkhome doesl not help (it looks like this switch is ignored): $ jvisualvm No jdkhome found $ update-java-alternatives -l java-1.6.0-openjdk-i386 1061 /usr/lib/jvm/java-1.6.0-openjdk-i386 java-1.7.0-openjdk-i386 1051 /usr/lib/jvm/java-1.7.0-openjdk-i386 $ jvisualvm --jdkhome /usr/lib/jvm/java-1.6.0-openjdk-i386 No jdkhome found $ jvisualvm --jdkhome /usr/lib/jvm/java-1.7.0-openjdk-i386 No jdkhome found -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
This bug does not seem to be fixed: Using Ubuntu 11.10 amd64 Installed packages: • visualvm 1.3.2-0ubuntu1 from oneiric • openjdk-7-demo 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates • openjdk-7-doc 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates • openjdk-7-jdk 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates • openjdk-7-jre 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates • openjdk-7-jre-headless 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates • openjdk-7-jre-lib 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates • openjdk-7-source 7~b147-2.0-0ubuntu0.11.10.1 from oneiric-updates no java 6 installed, no sun java installed when starting jvisualvm from terminal I get this: –– $ jvisualvm No jdkhome found –– the reason is that in /usr/bin/jvisualvm , line 13 the paths for java-6-openjdk and java-6-sun are hard-coded. Without having any java 6 installed jvisualvm can not start. How about a) integrating java-7-openjdk b) using the path of /etc/alternatives/javac instead/additionally -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
This bug was fixed in the package visualvm - 1.3.2-0ubuntu1 --- visualvm (1.3.2-0ubuntu1) oneiric; urgency=low * New upstream version. * Drop build dependency on libnb-apisupport2-java. LP: #832764. * Fix jdk detection. LP: #657048. * Update package description. LP: #813165. -- Matthias Klose d...@ubuntu.com Thu, 08 Sep 2011 13:38:19 +0200 ** Changed in: visualvm (Ubuntu) Status: Confirmed = Fix Released -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
** Changed in: visualvm (Ubuntu) Status: New = Confirmed -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
The correct fix depends on a full understanding of how jvisualvm actually works. The --jdkhome option appears to control only the JVM that VisualVM runs in, not the JVM which it monitors for Java instances. I can run the Sun VisualVM with the Sun JVM as jdkhome, and still see/monitor Java programs launched using OpenJDK. Equally, I can run the Sun VisualVM with the OpenJDK JVM as jdkhome, and monitor Java programs launched using Sun or OpenJDK JVMs. Is the fact I can monitor both because: a) OpenJDK, as a 'fork' of the Sun JDK, retains run-time compatibility in some way? b) The VisualVM uses standardised JRE/JDK APIs which all JDKs should support (so I could also view stuff launched using, say, IBM's JVM)? I assume (b), which would mean that my suggested fix is 'correct', because there is no reason to ever want to run one JDK-supplier's VisualVM using another supplier's JVM. -- 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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
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
[Bug 657048] Re: visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch
P.S. I also added the actual error message Cannot find java. Please use the --jdkhome switch to the bug title, so that people can find it more easily when searching. ** Summary changed: - visualvm fails to launch because it can't find jdk + visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch -- visualvm fails to launch because it can't find jdk: Cannot find java. Please use the --jdkhome switch https://bugs.launchpad.net/bugs/657048 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs