Running Java Web Start apps on Ubuntu Linux for AMD 64

I love Java Web Start.  I think it does a very good job of solving many of the Java distribution issues.  It supports automatic updating of apps at the jar level, including dependencies.  It really makes life easy for the end user, and really is pretty easy to implement for the developer.

But, if you are running Ubuntu Linux for AMD64 like I am, it won't work out of the box with the 64 bit JVM.  For whatever reason, Sun hasn't ported it.  Not that I'm complaining.  Now that Sun freed Java, we all have no one to blame but ourselves.

First, let me say, there are more issues for Beryl/Compiz users.  The information below won't help you.  I'll cover running Swing and Java Web Start on Beryl in a separate post later this week.

The solution is to install the 32 bit Java 1.5.  I realize Java 1.6 is available, but it won't work for some reason (I couldn't really tell why, the app just never comes up, but shows no errors).  The installation is pretty simple.  Just run:

sudo apt-get install ia32-sun-java5-bin

Then, you can launch Java web start apps using:

/usr/lib/jvm/ia32-java-1.5.0-sun/bin/javaws http://argouml-downloads.tigris.org/jws/argouml-0.24.jnlp

That example uses ArgoUML .24 but you can easily adjust.

Wrapper Script

You may not want to have to remember all that every time.  I have an easy fix.  Create a wrapper script:

sudo gedit /usr/local/bin/javaws

In the script place:

#! /bin/sh
/usr/lib/jvm/ia32-java-1.5.0-sun/bin/javaws $1

Or, you can just download mine.  Just make sure to set it as executable:

sudo chmod +x /usr/local/bin/javaws

Firefox Integration

In Firefox, when you click on a Java Web Start link, it will prompt you.  You can tell it to open with  /usr/lib/jvm/ia32-java-1.5.0-sun/bin/javaws or simply "javaws" if you created the wrapper script.  You can also check the "Do this automatically..." checkbox.  From that point on, .jnlp links will just work.

ok did all that you

ok did all that you suggested and it still will not work with ivocalize software in firefox ie lauch.jnlp Any ideas?

You'll have to provide more

You'll have to provide more information.  What's happening when you try to launch it?  If you see nothing, try this:  Right click on the link and chose "Copy Link Location".  Then, from the command line paste the link after javaws, like so "javaws http://www.example.com/link/link.jnlp".  Tell me if you get errors.

Thank you, thank you, thank

Thank you, thank you, thank you for this post.

Great post! Thanks very

Great post! Thanks very much. Followed your instructions and they worked perfectly.

Now in Ubuntu Gutsy the

Now in Ubuntu Gutsy the ia32-sun-java6-bin package does the trick automatically! Hooray!

Thank you! Worked for the

Thank you! Worked for the Quaqua demo very nicely on Ubuntu 7.10 AMD64 + Firefox 2.0.0.12

You da man Dan :) Thanks

You da man Dan :) Thanks

Thank you very much!!! It

Thank you very much!!! It worked like a charm with 64 Kanotix and Java 6 JERRY

Sorry but didn't work for me

Sorry but didn't work for me on Ubuntu 7.10 user@localhost:~$ /usr/lib/jvm/ia32-java-1.5.0-sun/bin/javaws http://www.randelshofer.ch/quaqua/jws/quaqua-test.jnlp Java Web Start splash screen process exiting ..... Splash: sysCreateListenerSocket failed: No such file or directory

Oh, you save me a lot of

Oh, you save me a lot of frustration... thanks so much.

I'm on Hardy Heron AMD64,

I'm on Hardy Heron AMD64, firefox3 beta, when I click the webstart icon it starts, asks me if to create sortcuts, then dies with error: /usr/share/themes/Clearlooks/gtk-2.0/gtkrc:41: error: lexical error or unexpected token, expected valid token....Cannot find any provider supporting DES/ECB/PKCS5Padding thanks

Nice post but I prefer

Nice post but I prefer setting the wrapper up by update-alternatives so whole workaround is:
sudo apt-get install ia32-sun-java5-bin
sudo update-alternatives --config javaws
and choose /usr/lib/jvm/ia32-java-1.5.0-sun/jre/bin/javaws

Obrys

It solves the problem only

It solves the problem only partialy. Applications are started using java5 not 6.

Try: sudo apt-get install

Try: sudo apt-get install sun-java6-jre or sudo apt-get install sun-java6-jdk (I'm running this now; 20 minutes to go!)

update-alternatives is

update-alternatives is automatically run when you install the ia32-java5 package. But, as I allude to above, just because you want to fix Java WS doesn't mean you want to run ALL Java programs under 32-bit Java 5. Which is the point of the javaws wrapper.

Nice!! Thanks you, I always

Nice!! Thanks you, I always use the latest JDK...this working for me.

Thanks a lot!! ombra32

Thanks a lot!! ombra32

I've translated it in italian

I've translated it in italian on my blog, and cited yours..thanks!! http://ombra32.blogspot.com/2008/10/ubuntu-804-e-i-file-jnlp-64bit.html ombra32

I've translated it in italian

I've translated it in italian on my blog, and cited yours..thanks!! http://ombra32.blogspot.com/2008/10/ubuntu-804-e-i-file-jnlp-64bit.html ombra32

I have followed your

I have followed your tutorial, and when running the application, Java gives me an error message on login saying "Cannot connect to server". When I reboot into 32-bit system then everything works fine but not on 64-bit Hardy. If I use 64-bit Open JDK supplied with Hardy it logs in fine and then waits forever for server to reply on retrieving my account information. So I desperately need this Java Web Start to operate. I have checked 32-bit Java Console network settings and they are correct. Any ideas? Thanks!

Ubuntu Documentation says

Ubuntu Documentation says that to run 32 bit Java you have to install 32 bit Firefox for AMD64. Is that what you guys did or anyone using 64 bit Firefox and work?

thank you for this

thank you for this information, it worked for me also

its now working.. but the

its now working.. but the prob is when i maximize my window, the uncovered portion won't get repainted..

THANKS a lot !!!! Works like

THANKS a lot !!!! Works like a charm ..... Happy new year to you.