Howto: Sun Java Web Start on Fedora 7

fedora-logo-bubble
I recently faced the problem of using a java web start application on my machine and wasn’t sure how to do this. It is a small fix others might want to know as well.

This howto is an addition to the Sun Java on Fedora 7 howto. Therefore you can only use it when you already followed the Java howto.

The main problem is that with the howto mentioned above (and also with a standard install of Fedora’s free Java implementation) there will be no javaws binary in any $PATH directory. When you have installed Sun’s Java there is such a binary, but it is still not in any $PATH directory.

What you have to do is to link it, the best is to do this by using the alternatives system to make sure you can use several Java installations next to each other. In the following code examples make sure your directory paths are set correctly because I use mine as an example, but you might have another Java version, and the version is hard coded into the directory (which is something I will never ever understand):

alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/java-1.5.0-sun-1.5.0.12/jre/bin/javaws 1

In this step we register the real javaws binary from the Java rpm package with the system under the point “javaws” and in the same step link it to the right $PATH directory, here /usr/bin/javaws. Also, we have to give a priority, and of course we set the priority to 1.

That’s it. In case of Konqueror (or also Firefox) you might also want to register the mime type “application/x-java-jnlp-file” with the executable given above. In Konqueror you do so by opening Settings -> Configure Konqueror -> File Associations. Find the type “x-java-jnlp-file” under “application” (or create it, the file type must be *.jnlp) and add the application /usr/bin/javaws to the application list (which is most certainly empty). That’s it.

To test the setup I used the (impressive) Qt Jambi web demo. Sun’s Web Start demos don’t work theough since they have the opinion I haven’t installed Java Web Start yet – I have no idea why…
For Firefox go to the Qt demo, click on the link and choose to open such files with /usr/bin/javaws every time.

10 Responses to “Howto: Sun Java Web Start on Fedora 7”

  1. Avi Alkalay Says:

    I guess only installing the javaws package from JPackage will do this job.

  2. Avi Alkalay Says:

    QT Jambi is really impressive.
    I was not aware of it before your post.

  3. liquidat Says:

    Do you have a link? I only found javaws-menu packages for redhat and mdk.

  4. Ed Martinescu Says:

    The SUN examples will work if you switch to the non-javascript version

  5. ben khelifa Moones Says:

    I’m using FC7 with the latest java version 1.6.0_02
    when i run javaws i have the message :*
    java.lang.UnsatisfiedLinkError: /usr/java/jdk1.6.0_02/jre/lib/i386/libdeploy.so: libstdc++.so.5: cannot open shared object file: No such file or directory

  6. liquidat Says:

    ben, check if you have the package compat-libstdc++ installed.

  7. Nick Pierpoint Says:

    I get the same error as ben:

    java.lang.UnsatisfiedLinkError: /usr/java/jdk1.6.0_02/jre/lib/i386/libdeploy.so: libstdc++.so.5: cannot open shared object file: No such file or directory

    anyone come up with a solution?

  8. Nick Pierpoint Says:

    I worked it out – you need to do:

    yum install compat-libstdc++-33

  9. net/net ~ Dominic Fitzpatrick » Blog Archive » JNLP - Get Java Web Start working in Fedora 8 Says:

    [...] The only area where I had to do a little work was with Java. If you want to use Sun Java, you need to download and install it yourself. The best instructions I found for doing this were on Mauriat Miranda’s Personal Fedora 8 Installation Guide. I’m not going to copy out what Mauriat has written here, because I know he’d rather I linked to his site. The other great post that helped me solve my little problem was /home/liquidat on the same issue in Fedora 7. [...]

  10. AC Says:

    Thanks installing the compat-libstdc worked out for me


Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 37 other followers