** Description changed:

- I've installed both openjdk-6-jdk, and visualvm. When I launch
- jvisualvm, it displays "No jdkhome found."
+ SRU Request for precise
  
- It seems the jdk directory which /usr/bin/jvisualvm expects is not correct.
- jvisualvm expects jdks at "/usr/lib/jvm/java-6-openjdk" or 
"/usr/lib/jvm/java-6-sun", but my /usr/lib/jvm directory is like this:
+ #### SRU Justification ###
  
- $ ls -l /usr/lib/jvm
- total 20
- drwxr-xr-x 4 root 4096  5月 18 16:23 java-1.5.0-gcj-4.6
- lrwxrwxrwx 1 root   20  4月 13 09:36 java-1.6.0-openjdk-amd64 -> 
java-6-openjdk-amd64
- lrwxrwxrwx 1 root   20  4月 13 12:00 java-1.7.0-openjdk-amd64 -> 
java-7-openjdk-amd64
- drwxr-xr-x 7 root 4096  5月 21 08:12 java-6-openjdk-amd64
- drwxr-xr-x 3 root 4096  5月 18 15:11 java-6-openjdk-common
- drwxr-xr-x 5 root 4096  5月 18 15:12 java-7-openjdk-amd64
- drwxr-xr-x 3 root 4096  5月 18 15:10 java-7-openjdk-common
+ [Impact]
+ jvisualvm is currently unable to start in Precise.
+ 
+ [Development Fix]
+ Fixed in lp:~kroq-gar78/ubuntu/precise/visualvm/fix-start revno 16 
(http://bazaar.launchpad.net/~kroq-gar78/ubuntu/precise/visualvm/fix-start/revision/16)
 along with bug 937710 (they are _very_ similar in nature) by adding `dpkg 
--print-architecture` to the end of the java-6-openjdk path. Because I fixed it 
in conjunction with bug 937710, I also added a 'java-7-openjdk-$ARCH' path.
+ 
+ [Stable Fix]
+ To do this after the package has been installed, edit the file 
/usr/bin/jvisualvm and include the same fix, following this diff:
+ 
+ @@ -8,9 +8,10 @@
+  progdir=/usr/bin
+  APPNAME=visualvm
+  BASEDIR=/usr/lib/visualvm
+ +ARCH=`dpkg --print-architecture`
+  
+  jdkhome=
+ -for j in /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun; do
+ +for j in /usr/lib/jvm/java-6-openjdk-$ARCH /usr/lib/jvm/java-6-sun; do
+      if [ -x $j/bin/javac ]; then
+       jdkhome=$j
+       break
+ 
+ Since /usr/bin/jvisualvm is the same file as debian/jvisualvm in the
+ package source, the file can be edited exactly as it was edited in the
+ Bazaar branch above.
+ 
+ [Test Case]
+ 1) Install the package 'visualvm'
+ 2) Run 'jvisualvm' from a terminal
+ 
+ With the version in Precise, it will error out with:
+ No jdkhome found.
+ 
+ [Regression Potential]
+ The potential for regression is extremely low because running the program 
isn't currently possible.
+ 
+ #######
+ 
+ visualvm 1.3.2-0ubuntu2 running on Ubuntu 12.04 LTS.

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

Title:
  [SRU] jvisualvm won't launch

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to