Cannot open .jar with right-click > open with "sun java 6 runtime"

Bug #568707 reported by Savvas Radevic
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
sun-java6 (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by Wolfgang Pietsch
Nominated for Lucid by Wolfgang Pietsch

Bug Description

Trying to open jdownloader (www.jdownloader.org) JDownloader.jar with right-click > "open with".

$ sudo update-alternatives --display java
java - manual mode
 link currently points to /usr/lib/jvm/java-6-sun/jre/bin/java
/usr/lib/jvm/java-6-openjdk/jre/bin/java - priority 1061
 slave java.1.gz: /usr/lib/jvm/java-6-openjdk/jre/man/man1/java.1.gz
/usr/lib/jvm/java-6-sun/jre/bin/java - priority 63
 slave java.1.gz: /usr/lib/jvm/java-6-sun/jre/man/man1/java.1.gz
Current `best' version is /usr/lib/jvm/java-6-openjdk/jre/bin/java.

Works: JDownloader.jar > right-click > open with "openjdk java 6 runtime"
Does not work: JDownloader.jar > right-click > open with "sun java 6 runtime"

java in terminal and in an application launcher works though, e.g.:
java -jar /home/forger/jdownloader/JDownloader.jar

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: sun-java6-bin 6.20dlj-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Apr 22 23:51:18 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100329)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: sun-java6

Revision history for this message
Savvas Radevic (medigeek) wrote :
Revision history for this message
Savvas Radevic (medigeek) wrote :

I think this causes the problem:

$ cat /usr/share/applications/sun-java6-java.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Sun Java 6 Runtime
Comment=Sun Java 6 Runtime
Exec=@java_launcher@ -jar
Terminal=false
Type=Application
Icon=sun-java6
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true

What's @java_launcher@ ?

Revision history for this message
Savvas Radevic (medigeek) wrote :

It looks like the debian/rules has this (from the diff.gz):

+debian/control: debian/control.in debian/rules
+ @cp -p debian/control debian/control.old
+ sed -e 's/@JRE@/$(p_jre)/g' \
+ -e 's/@JDK@/$(p_jdk)/g' \
+ -e 's/@vendor@/$(Vendor)/g' \
+ -e 's/@basename@/$(basename)/g' \
+ -e 's,@basedir@,$(basedir),g' \
+ -e 's/@srcname@/$(srcname)/g' \
+ -e 's/@arch@/$(DEB_HOST_ARCH)/g' \
+ -e 's/@sarch@/$(arch)/g' \
+ -e 's/@RELEASE@/$(relstring)/g' \
+ -e 's/@archdir@/$(archdir)/g' \
+ -e 's/@browsers@/$(browsers)/g' \
+ -e 's,@java_launcher@,$(java_launcher),g' \
+ -e 's/@cjk_fonts@/$(cjk_fonts)/g' \
+ -e 's,@pkg_version@,$(if $(filter $(distrelease),etch dapper edgy feisty gutsy),$${Source-Version},$${source:Version}),g' \
+ debian/control.in > debian/control

But I think I don't see a sed command to replace "@java_launcher@" in file debian/JB-java.desktop.in

Revision history for this message
Wolfgang Pietsch (wolfgang-pietsch) wrote :

6.20dlj-1ubuntu3 was just released to lucid, now will there be another update against earlier released 6.20dlj-0ubuntu1.9.10 for karmic? I don't see the change note from lucid in the karmic pac. Heavy going today... ;)

Revision history for this message
Savvas Radevic (medigeek) wrote :

Confirming it's fixed for lucid. The launchpad janitor for some reason didn't update it.

Revision history for this message
Savvas Radevic (medigeek) wrote :

I think the karmic package is *not* affected:

~/Desktop/sun-java6-bin_6.20dlj-0ubuntu1.9.10_amd64/data$ cat ./usr/share/applications/sun-java6-java.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Sun Java 6 Runtime
Comment=Sun Java 6 Runtime
Exec=/usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -jar
Terminal=false
Type=Application
Icon=sun-java6
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true

Changed in sun-java6 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.