Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Thursday, October 4, 2012

HOWTO: Elluminate Live Application Sharing on Ubuntu 12.04

TL;DR: Elluminate Live Application Sharing is broken under Oracle JRE 7. Use Oracle JRE 6 instead and configure Elluminate Live accordingly.

This week, in an online class I'm taking, I was asked to give the class a demonstration of an app I had just written. This was to be accomplished via Elluminate Live (which was recently acquired by Blackboard.com).

When I attempted to begin my presentation, I found that I was unable: under Tools->Application sharing, I only had one option ("stretch to fit") available. Two others, Request Desktop Control and Request Control of Shared Applications were present but greyed out. Normally, many more options should be available--the fact that they weren't made giving my demo impossible. I was left in a lurch and had to ask my professor to move on to the next presenter.

I knew there had to be a way to fix this, so I set about figuring one out. Fortunately, I found one. The issue turned out to be with Oracle JRE 7.

Here's what I did to get desktop application sharing working for Elluminate Live on Ubuntu 12.04:

  1. Install the Java 6 JRE. This is easier said than done at this point as Java 6 is near end-of-life and is unavailable from the Ubuntu or Ubuntu partner repos due to licensing issues. Instructions for installing it (legally) can be found here. I used the flexiondotorg github repository method.
  2. Set Java 6 as the default JRE (see Ubuntu help link in #1 above).
Note: There is one more step: tell the Elluminate application which JRE to use. After completing steps 1 and 2 above I noticed that under Help->About Elluminate Live->Information->Java Virtual Machine, Elluminate reported that it was using Java 6 for javaws but Java 7 for its JRE despite me setting Java 6 to be my default JRE. What I had to do was start javaws from the command line ($ javaws) and choose the Java tab, click the View button under Java Runtime Environment Settings and disable the Oracle 7 JRE. The next time I entered the Elluminate Live session, application sharing worked!

Now I won't have to resort to using a Windows VM to just to get into my class every week.

Note: OpenJDK might work, but I haven't tried it in a couple of years due to other issues I ran into with that JRE.

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.

Wednesday, October 21, 2009

Getting Started with Eclipse

For about the last month I have been learning Java. Due to outside requirements, I have been using the BlueJ IDE for development. However today I decided to give Eclipse a try.

I installed version 3.2.2 from the Ubuntu repos and loaded a project I had just completed in BlueJ. It was then that I was greeted with a few errors regarding my code. The first of which was:

    Scanner cannot be resolved to a type

The line of code in question was:

    private Scanner userInput = new Scanner(System.in);

Strange, I thought, since I had made no changes to the code and had just compiled and run this project in BlueJ.

I first checked the installed version of Java:

    $ java -version
    java version "1.6.0_0"
    OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu11)
    OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)


    $ javac -version
    javac 1.6.0_0

Ok, everything looked good there. I checked the compiler settings in Eclipse and changed the compiler from 5.0 compliant to 6.0 compliant. No joy.

After some more digging I concluded that the issue was probably that Eclipse was not using the proper JRE. Sure enough, Eclipse was using version 1.5 at /usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0. I added another JRE entry pointing to /usr/lib/jvm/java-6-openjdk (which is what my BlueJ installation was already using) and voila! No more errors.

I guess I should look into cleaning up the multiple JRE's I have installed on this machine.

But first, back to exploring Eclipse!