Another Java Web Start Pitfall

Yesterday, I installed shiny new Ubuntu Lucid Lynx on a shiny new laptop. This morning, I launched a Web Start application, and I got the following screen:

Look at the weird font. And the double checkbox.

When I continued, my desktop locked up and I had to reboot. Good thing Lucid Lynx reboots amazingly quickly because I went through that for several more times before I finally figured out what was wrong.

No, this time it was not gcj/OpenJDK/Iced Tea or a missing Java Plug-In in Firefox. I had sun-java6-jdk installed, and it properly set up Firefox. What about the JNLP association?

Looking good...

I restarted Firefox from a terminal, hoping to see some console messages. Here is what I got:

That was weird. wininet? wine3d_guess_card? The plot thickened.

It turns out that Wine installed a MIME type handler ~/.local/share/applications/wine-extension-jnlp.desktop. I still don't know what made it do that. But removing that file solved the problem. Alternatively, don't accept the default in Firefox but explicitly tell Firefox to run /etc/alternatives/javaws.

I always felt that the JNLP association is a terribly fragile part of Java Web Start. (That's why I never check the "Do this automatically for files like this from now on" box in Firefox.) It might be a good idea for Oracle to put in a check in the Java Plug-In to check the integrity of the JNLP association when it loads.