WebStart 1.6 issues with intranet JRE installers

My team develops a large intranet app that uses Webstart for deployment. Our latest release works great with 1.5.0_11, but one of our customers is trying to use Java 1.6's Web Start so we've started looking at the issues.

In my jnlp files I specify that I want to use a JVM that they can download locally:

<resources>

<j2se version="1.5.0_11" href="/j2se.jnlp" max-heap-size="100M"/>

<j2se version="1.5.0_11" href="http://java.sun.com/products/autodl/j2se"

When I try to launch this JNLP with 1.6 (on Vista) it gets an exception:

The application has requested a version of the JRE (version 1.5.0_11) that is currently not locally installed. Java Web Start is unable to automatically download and install the requested version. This JRE must be installed manually.

The exception details:

JNLPException[category: System Configuration : Exception: null : LaunchDesc:

><jnlp spec="0.2 1.0" codebase="http://10.44.255.216:8081/">

<information>

<title>CompanyName Permission Utility - </title>

<vendor>CompanyName</vendor>

<homepage href="http://www.CompanyName.com/"/>

<description>Setup your client to run CompanyName Java Web Start based applications. This only needs to be run once for each system you wish to connect to, so you can remove the application from your computer after it has been run.</description>

<icon href="http://10.44.255.216:8081/resource/webStartIcon.gif" kind="default"/>

<icon href="http://10.44.255.216:8081/resource/web/webStartSplash.jpg" kind="splash"/>

<offline-allowed/>

</information>

<security>

<all-permissions/>

</security>

<update check="timeout" policy="always"/>

<resources>

<java max-heap-size="104857600" href="http://10.44.255.216:8081/j2se.jnlp" version="1.5.0_12"/>

<java max-heap-size="104857600" href="http://java.sun.com/products/autodl/j2se" version="1.5.0_12"/>

<jar href="http://10.44.255.216:8081/resource/WebStartTools.jar" download="eager" main="false"/>

</resources>

<application-desc main-class="webStart.SecurityAdjuster">

<argument>app1.jnlp</argument>

</application-desc>

</jnlp> ]

at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)

at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)

at com.sun.javaws.Launcher.launch(Unknown Source)

at com.sun.javaws.Main.launchApp(Unknown Source)

at com.sun.javaws.Main.continueInSecureThread(Unknown Source)

at com.sun.javaws.Main$1.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

I have not had this problem before. Any ideas? Thanks!

[2889 byte] By [dabatesa] at [2007-11-27 8:34:58]
# 1

> Java Web Start is unable to automatically download and

> install the requested version. This JRE must be installed

> manually.

The exception is not surprising given the inability to

download that version.

Had you considered not locking it down so much?

e.g. instead of..

<j2se version="1.5.0_11" href="/j2se.jnlp" max-heap-size="100M"/>

..try..

<j2se version="1.5.0_11+" href="/j2se.jnlp" max-heap-size="100M"/>

AndrewThompson64a at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...
# 2
The first line gives WebStart a location where that version is available. The second line is there because it makes it so that a non-webstart jre install works too. It doesn't seem to matter if the link works or not. At least it hasn't in the past.
dabatesa at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...
# 3

> > Java Web Start is unable to automatically download

> and

> > install the requested version. This JRE must be

> installed

> > manually.

>

> The exception is not surprising given the inability

> to

> download that version.

>

> Had you considered not locking it down so much?

>

> e.g. instead of..

> <j2se version="1.5.0_11" href="/j2se.jnlp"

> max-heap-size="100M"/>

> ..try..

> <j2se version="1.5.0_11+" href="/j2se.jnlp"

> max-heap-size="100M"/>

Oh, and I can't open it up more because we have only tested that release with 1.5.0_11. We have run into issues before with Java introducing bugs in a patch release, so we don't trust it until we test it.

dabatesa at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...
# 4

The reason you can not auto download any java version from javawebstart on vista, is that the installer calls Runtime.exec in java to invoke the actual jre installer, and Runtime.exec will just fail on vista, for any application such as an MSI installer that requires elevated priviliges.

We hope to update the jre installers in the near future to enable them to run on vista, and then will modify Java Web Start to allow it.

In the mean time you must download the earlier versions automatically.

/Andy

dietz333a at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...
# 5

Interesting. I'm sure that this is a problem for many installers, but my installer (just uses the Zip classes to unzip the JRE) does not call Runtime.exec().Unfortunately my problem appears to be the exception which seems to be generated by Web Start itself before giving me a chance to do my install.

I am assuming that this exception was just thrown in for Vista to give a nice message instead of getting the security exception. However, it is preventing me from doing my stuff. Hopefully you can get it fixed soon, or at least give us a work around if our installer will not cause the security exception.

Thanks!

dabatesa at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...
# 6

Where does Java WebStart keep store the JRE-Autodownload preference. By default it's set to "NEVER" (which is viewable from the Java Control Panel->Advanced )tab. But this is greyed out for users without Admin rights on their PC. So what files need to be updated to allow a user without admin rights to change this to 'ALWAYS' or 'PROMPT'.

hajajajasadfa at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...
# 7

I haven't seen this feature yet. I am not using 1.6 in ernest yet, I am just addressing other computer issues. This sounds like it will also be a problem for me... ARGH! Why must they continue to pull the rug out from under us. It makes me want to write the whole thing myself so they can't mess me up.

That said, I don't know where they will put this setting. Maybe they will put it in the deployment.properties with the other stuff... I'll look at this when I move to 1.6 completely in a few days.

When will the Java guys learn not to follow Microsoft's increasingly impossible security model. Once the user says they trust us, then let us do what we want!!

dabatesa at 2007-7-12 20:31:22 > top of Java-index,Desktop,Deploying...