Question

I have an issue concerning JNLP / Java Web Start. I have absolutely no knowledge of JNLP.

A (Swing) application is compiled with JDK 1.7 (source and target) and launched by client via Web Start.

This is the JNLP file, unimportant info omitted:

<jnlp spec="1.0+" codebase="http://someurl" href="http://someurl/launcher.jnlp">
<information>
    <title>...</title>
    <vendor>...</vendor>
    <homepage href="www.mycom.com" />
    <description>...</description>
</information>

<security>
    <all-permissions />
</security>

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

<resources>
    <java version="1.5+" initial-heap-size="128M" max-heap-size="256M"/>
    <jar href="lib/main.jar" main="true"/>              
    <jar href="lib/other.jar"/>
</resources>

<application-desc main-class="com.pkg.Launcher"/>
</jnlp>

Problem one:

Whenever a client has a JRE 1.6 installed (or a least JAVA_HOME or PATH is set to it), Web Start doesn't start at all.

Desired behavior

Download Java 7 JRE

Problem two:

If V 7 is installed on the client machine, the launcher prompts to download an up-to-date version, with an option to update now / postpone for later.

Desired behavior

Do the update in background / somehow ignore it as long as this message will not appear.

Was it helpful?

Solution

Regarding your first problem, if you want Java 1.7+, then just say so in your resources. Replace:

<java version="1.5+" initial-heap-size="128M" max-heap-size="256M"/>

with:

<java version="1.7+" href="http://java.sun.com/products/autodl/j2se" initial-heap-size="128M" max-heap-size="256M"/>

The href part will ask the client to download Java 7 if it is still on Java 6 (or less).

I don't know how to solve your second problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top