Tuesday, December 11, 2012

Fix: Add Apache Derby Nature in Eclipse does nothing

Tonight I had a strange issue with Eclipse: adding the Apache Derby nature to an Eclipse project wasn't working. Ordinarily, (provided that the Apache Derby Eclipse plugin is already installed) right-clicking a project and choosing Apache Derby->Add Apache Derby Nature to a project will do just that, enabling additional features such as starting or stopping the Derby network server.

This time, however, choosing that option appeared to do nothing. Rather than a menu full of commands, I was given only the option "Add Apache Derby Nature" in the Apache Derby context menu, which is what I had previously selected. I tried several times to add the nature in this manner, but to no avail.

The fix turned out to be simple. After grepping the directory of another project where I had successfully used Derby, I found that the change should have been reflected in my project's .project file.

The fix: if the Apache Derby nature isn't correctly added to a project through the Apache Derby menu, it can be done manually by editing the .project file (which is in the root directory the project). This is an XML file.

Find the <natures> node and add this line:

<nature>org.apache.derby.ui.derbyEngine</nature>

Here's how the entire <natures> node looks after the change in my project:



<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.apache.derby.ui.derbyEngine</nature>
</natures>

Then, just save the file. Problem solved.

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.