Thursday, May 6, 2010

Using .jnlp files in Ubuntu 10.04

After a rocky upgrade to Ubuntu 10.04, I encountered my first issue with my out-of-the-box experience using the new release of Ubuntu. In order to attend virtual class sessions through an online course at a local university in which I am currently enrolled, I use a Java application (specifically, one built on the Elluminate platform). Accessing the class involves me downloading and running a .jnlp file using the installed JRE.

When I attempted to log in to class tonight, however, I was unable to do so. When I ran the jnlp file, the interface attempted to load, then crashed. The command line output was:


Exception in thread "Elluminate Live!" java.lang.NoClassDefFoundError: Could not initialize class com.elluminate.util.UtilDebug
    at com.elluminate.util.I18nText.getResourceList(I18nText.java:523)
    at com.elluminate.util.I18nText.(I18nText.java:52)
    at com.elluminate.util.I18n.(I18n.java:57)
    at com.elluminate.platform.Platform.(Platform.java:39)
    at com.elluminate.compatibility.CThread.(CThread.java:15)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:454)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:731)


The issue, I discovered after browsing launchpad for a few minutes, is known to come up with the OpenJDK JRE, which is the default JRE for Ubuntu beginning with this new release, and .jnlp files. At this time, there are multiple open bugs on launchpad regarding the same or similar issues, so I did not bother filing another.

Luckily, this can be worked around by installing the non-free Sun JRE. Here is what I did:

First, I followed the instructions here for installing Sun's JRE from the Ubuntu partner repository. However, these instructions are incomplete as there are no steps to configure which JRE is the system default. This is simple and can be accomplished by running the following command in the terminal:


sudo update-alternatives --config javaws

...and following the on-screen instructions. Once I did that, fortunately, I was able to access my course session jnlp file again with no issues.

2 comments:

  1. Thank you! I needed this to work for a class as well.

    ReplyDelete
  2. Hello, sir i would like to ask that what is the scope of java training, what all topics should be covered and it is kinda bothering me … and has anyone studies from this course http://www.wiziq.com/course/1779-core-and-advance-java-concepts of core and advance java online ?? or tell me any other guidance...
    would really appreciate help… and Also i would like to thank for all the information you are providing on java concepts.

    ReplyDelete