Last weekend was spent installing Ubuntu Karmic on my laptop. Because of all the programming stuff I am working on it just made sense even though I am already missing a few of my favourite Windows programs. As soon as I got Netbeans set up I tried running a JavaFX application I had been working on. The stage icons and the images I had loaded in were nowhere to be seen. I gave this a few days to percolate and sat down this evening to sort it out. I started out thinking that it might be a problem with the file paths being different on *nix but a little experimentation showed that paths were not the problem. It took a little reading before I got a reminder; Sun is not the default JVM on Ubuntu! Grrrr.
After switching to Sun Java away from Open-JDK all my images and stage icons were loading happily and my JavaFX app runs just like it did on Windows. Here is the command:
mike@sleepycat:~$ sudo update-alternatives –config java
There are 2 choices for the alternative java (providing /usr/bin/java).Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual modePress enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to provide /usr/bin/java (java) in manual mode.