|
HOW TO GET .jnlp Java apps to run from Firefox in Gnome
Following my creedo of "Every time I spend 45 minutes screwing with something and then finally figure it out", I want to put my solution here so that it'll be here for other people (and me, when I forget) later to find via search.
PROBLEM:
Java apps using the JNLP (java network launcher protocol, or whatever) don't work.
You click on "run app" on a webpage, and it pops up a "What do I open this with?!?". The default answer is either "firefox" or "mozilla", but when you click OK, it just goes ahead and pops up another browser, and then says "What do I open this with?!?" ad infinitum.
You *KNOW* you've got java installed. Hell, you installed JRE, JDK, and then just to be on the safe side, the entire billion-megabyte J2EE suite.
You've symlinked the libjavaplugin.so thingie from BOTH your firefox install's plugins directory AND your ~/{.mozilla|.firefox}/plugins/ directory.
You've tried telling firefox to start the application with the JRE/bin/java app.
You've tried to change the mime type thingie for application/java-jnlp-network-launcher or whatever, but you can't for the life of you figure out how to edit the "download" actions. Downloading some obscure FF extention from romania doesn't solve it, either.
Still doesn't work. You're about to commit sepuku.
SOLUTION:
Next time you come across a .jnlp, click "Save to disk" and save it to desktop or ~ or whatever.
Open a gnome finder window thingie, right click the jnlp file, and select whatever the equivilant of "Open With..." is. Navigate to your javaws application. This is going to be under your JRE folder, which could be any number of places. It could be anywhere from /usr/java/jdk/jre/bin/javaws or /opt/SUNWappserver/jdk/jre/bin/javaws or anywhere. When in doubt, and desperate, try which javaws. If it returns a Sun java, cool, use that one. If it returns nothing or one of the silly GNU java-alternatives in /etc/alternatives/blah (track down the symlinks), then do a cd / ; find | grep javaws or whatever your pefered method of thrashing your hard drive for 5 minutes is.
You should be good. Gnome now knows what application to use to open the thing, so when firefox doesn't know, it'll ask gnome, and gnome will know. You can even click "do this from now on" if you're confident the next time firefox asks.
~Xiao.
|