IcedTea Java Web Start fails to open .jnlp file

Bug #969520 reported by Sam_
This bug affects 26 people
Affects Status Importance Assigned to Milestone
icedtea-web (Ubuntu)

Bug Description

Attempt to open a downloaded .jnlp file by right click and selecting 'IcedTea Java Web Start' fails.
There is no result or feedback what's wrong.
.xsession-errors reveals that /usr/bin/javaws wrongly points to java-6-openjdk although it isn't installed and hence no alternative.
Workaround: adjust lines 3 and 9 to java-7*.

Example files.
## another example would be 'sweethome3d' in bug 224800

## On attempt to run the .jnlp file firefox is preselected, downloads the file and opens an empty tab.
Edit: Failed mimetype was addressed and fixed in bug 949823.

Related packages installed.
ii icedtea-7-jre-cacao 7~u3-2.1-1ubuntu3
ii icedtea-7-jre-jamvm 7~u3-2.1-1ubuntu3
ii icedtea-7-plugin 1.2-1ubuntu1
ii icedtea-netx 1.2-1ubuntu1
ii icedtea-netx-common 1.2-1ubuntu1
ii openjdk-7-jre 7~u3-2.1-1ubuntu3
ii openjdk-7-jre-headless 7~u3-2.1-1ubuntu3
ii openjdk-7-jre-lib 7~u3-2.1-1ubuntu3

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: icedtea-netx 1.2-1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-20.33-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
Date: Fri Mar 30 20:25:21 2012
Dependencies: icedtea-netx-common 1.2-1ubuntu1
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120204)
SourcePackage: icedtea-web
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Matthias Klose (doko) wrote :

with openjdk-6:

Exception in thread "Volume Viewer" java.lang.NoClassDefFoundError: javax/media/opengl/GLEventListener
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(
 at Method)
 at net.sourceforge.jnlp.runtime.JNLPClassLoader.findClass(
 at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClassExt(
 at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(
 at java.lang.Class.getMethod0(
 at java.lang.Class.getMethod(
 at net.sourceforge.jnlp.Launcher.launchApplication(
 at net.sourceforge.jnlp.Launcher$

Revision history for this message
Sam_ (and-sam) wrote :

Tested on a laptop atm (packages are up-to-date on both machines).
A click on .jnlp file opens the dialog and suggests to open it with java webstart.
The file will be downloaded to /tmp, after notification of successful download nothing happens.

Although there is no java -6* installed .xsession-errors says something else when trying to open the file with icedtea webstart:
/usr/bin/javaws: Zeile 66: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java: No such file or directory

Same output when running in a terminal:
ACR (Component): component init
Running global cleanup code from study base classes.
/usr/bin/javaws: line 66: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java: No such file or directory

ii icedtea-7-jre-cacao 7~u3-2.1.1~pre1-1ubuntu1
ii icedtea-7-jre-jamvm 7~u3-2.1.1~pre1-1ubuntu1
ii icedtea-7-plugin 1.2-2ubuntu1
ii icedtea-netx 1.2-2ubuntu1
ii icedtea-netx-common 1.2-2ubuntu1

ii openjdk-7-jre 7~u3-2.1.1~pre1-1ubuntu1
ii openjdk-7-jre-headless 7~u3-2.1.1~pre1-1ubuntu1
ii openjdk-7-jre-lib 7~u3-2.1.1~pre1-1ubuntu1

No alternatives, nothing to configure.
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu1)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

Revision history for this message
Sam_ (and-sam) wrote :

There is still an openjdk-6* folder in /usr/lib/jvm/ and /etc/alternatives/javaws points to it. (screenshots)
Obviously openjdk-6* wasn't really purged as expected.

Due to .xsession-errors output of /usr/bin/javaws I've adjusted lines 3 and 9 to openjdk-7*.
Successful result, icedtea webstart donwloads the files.

Volumeviewer still doesn't run due to security concerns. (attached debug file)
Sweethome3d runs successfully after icedtea webstart downloads referring files. (screenshot)

Purge packages completely as requested incl. libraries.
Update alternatives links properly when there is only one alternative and nothing to configure.
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64

Revision history for this message
Sam_ (and-sam) wrote :
Revision history for this message
Sam_ (and-sam) wrote :
Revision history for this message
Sam_ (and-sam) wrote :
Sam_ (and-sam)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in icedtea-web (Ubuntu):
status: New → Confirmed
Revision history for this message
Kemel Zaidan aka Legendario (kemelzaidan) wrote :

This could be the answer. The /usr/bin/javaws file from openjdk-7-plugins is looking for the openjdk-7 runtime:

kemel@torresmo:~$ head /usr/bin/javaws



I have changed it for:



and it seems to be fixed

Sam_ (and-sam)
description: updated
Revision history for this message
Stefan Divjak (stefan-divjak) wrote :

This bug is still present in quantal, and the above fix works. For the newbies, you need to
- Press Alt+F2
- enter the following (without paranthesis): "gksudo gedit /usr/bin/javaws"
- enter your password
- Change the "7" in the first line to a "6"
- Save and quit

Revision history for this message
Stefan Divjak (stefan-divjak) wrote :

...obviously, I ment: Without double quotes, not without paranthesis.

Revision history for this message
KennoVO (kenno-xs4all) wrote :

The above workaround will break every time the package is updated. The correct workaround (in line with what Sam_ posted) is:
sudo update-alternatives --config javaws
and then choose the number in front of /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws

Of course, this doesn't change the fact that this is a bug that needs to be fixed. Specifically, the packages should provide the package manager with the necessary hints so that the alternatives are always set right (if I understand the software stack correctly).

Revision history for this message
deja_vu (deja-vu) wrote :

Ran into this while trying to switch to openjdk 7 on a number of machines. You can get rid of the old javaws-alternative using
 update-alternatives --remove javaws /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws
It will then automatically use the openjdk-7 version.

Revision history for this message
Tim Edwards (tkedwards) wrote :

I also hit this bug trying to switch from OpenJDK 6 to 7. The solution in comment #12 worked for me and IMHO is the best solution as it avoids hacking script files which will be overwritten by any future package updates.

This looks like a simple bug caused by one of the openjdk-6-* packages not cleaning up after itself properly, can we get it fixed?

Revision history for this message
juri (eng-juri) wrote :

To Fix this prob perform this steps
1. install java-7-oracle

sudo apt-get purge openjdk*

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Update /usr/bin/javaws

sudo cp /usr/bin/javaws /usr/bin/javaws.old

vi /usr/bin/javaws

change 2 parameters like this:

Have fun!!!

Revision history for this message
Herbert Thielen (thielen) wrote :

On ubuntu 12.04.4 (precise), I was able to run a *.jnlp from Firefox (26.0+build2-0ubuntu0.12.04.2) only after manually configuring update-alternatives to use javaws from openjdk-7:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise

# update-alternatives --config javaws
There are 2 choices for the alternative javaws (providing /usr/bin/javaws).

  Selection Path Priority Status
  0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws 1061 auto mode
  1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws 1061 manual mode
* 2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws 1060 manual mode

Press enter to keep the current choice[*], or type selection number: 2

# dpkg -S /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws
icedtea-netx: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws
icedtea-netx: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javaws

# apt-cache policy icedtea-netx
  Installed: 1.2.3-0ubuntu0.12.04.3
  Candidate: 1.2.3-0ubuntu0.12.04.3
  Version table:
 *** 1.2.3-0ubuntu0.12.04.3 0
        500 precise-updates/main amd64 Packages
        500 precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     1.2-2ubuntu1 0
        500 precise/main amd64 Packages

Now it's working fine for me :-)

Best regards,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers