I have encountered this error:
java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
I w
I am using Ubuntu 12.04 LTS 64-bit with Oracle jdk1.6.0_45 and was having the same problem. I’m running gnome-classic as the desktop instead of Unity. This is what worked for me:
sudo apt-get install libgnome2-0
After installing this package I restarted my Java Swing app and Desktop.getDesktop().open(new File("myfile")); worked just fine.