Webstart Configuration

Hi,

Im currently working on a project which we wish to distribute using Java WebStart. Unfortunately, we are discovering that a large number of users do not have Java Webstart properly configure (both on Windows and Linux). Does anybody know of a good webpage I can point my users to they can fix their webstart configuration. Most of my users are pretty computer savy, but I don’t want to write a WebStart guide if one already exists.

Thanks,

Alex

I’m just curious, about what kind of configurations you are talking about?
The only thing I have changed from the defaults is that webstart calls firefox instead of mozilla, which of course isn’t really needed ::slight_smile:

Me bad, didn’t explain myself properly.

It’s not Webstart that’s not properly configured, it’s their browser. So the proper question I should have asked is : Does anybody know of a good resource that will allow people to configure their browser to Webstart starts properly. In my experience, MacOs X is the only OS i’ve seen where every browser is configured correctly to use Webstart by default. Under Windows, Explorer is usually ok, but I’ve had to configure Firefox in the pass. With Linux, the browser always needs to be reconfigured.

Alex

The problem probably is mime-type based.

First, aussure your webserver sends the right mime-type for jnlp files:

Using apache add the follwing to the httpd.conf file:
AddType application/x-java-jnlp-file .JNLP

If you have no access to server-configuration files, but can use PHP or JSP, one of the follwong hacks should help:

  1. PHP-based: Rename the .jnlp file to .php and add the following at the top:
<?php header("Content-type: application/x-java-jnlp-file"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";?>
  1. JSP-Baed: Rename the .jnlp file to .jsp and add the following at the top:
    <%@ page contentType=“application/x-java-jnlp-file” %>

Configure the MIME-Type on the client machine:

This is done for IE automaticly (and also probably for MacOS X - I don’t know ::))
In other browsers like Mozilla or KDE’s Konqueror you can set them manually in the preferences. Simply add x-java-jnlp-file to the application group using the .JNLP file asociation with the JavaWebstart executable (javaws[.exe]) in the $JRE_HOME/bin directory.
Firefox doens’t offer this setup, but just select open with (instead of save as) and search for javaws[.exe] with the ‘Do this automatically for files like this from now on’ option checked.

Hope that helps

  • Michael

Be aware of the safari browser (mac os) that doesn’t recognizes a .php file as of the jnlp type even with correct mime type (better stick to .jnlp and associate it with php engine on your .htaccess file)

Lilian

Really ? And thats the default Mac browser ? thats pretty annoying. I’m doing a similar thing with my JNLP file. For ASP, the syntax is almost the same as the above, if anyone is interested :
<%Response.ContentType=“application/x-java-jnlp-file”%>

I -have- to do this, I contacted my (paid !) hosting service when I discovered that JNLP wasn’t set up as a MIME type on the server, and they actually just refused to do it ! Well actually first I had to explain to them what a JNLP file actually IS. Apparently it was -ahem- too much hassle -ahem- I suppose you gets what you pays for in that respect, cheapest local hosting service that allows scripting etc. in Dublin. Wouldn’t recommend it to anyone else though.

D.

Yes.

[quote]And thats the default Mac browser ?
[/quote]
Yes.

[quote]thats pretty annoying.
[/quote]
Yes. Please file a bug with Apple. http://bugreporter.apple.com/
(free) registration required.

Good news, I’ve tried again the .php extension with safari and now it recognizes the JNLP mime type ;D (in fact it changes the file extension from .php to .jnlp as it can be seen from the download dialog…).

Don’t know since when it works, but it must have been packed with a recent os update.

This is on OS X 10.3, haven’t tried tiger yet.

Lilian