views:

43

answers:

1

We have a java app which uses Java Web Start. The jnlp file is configured with [j2se version="1.5+"]. So if JRE 1.5 and 1.6 are installed, the app is run on 1.6.

Now, we have requirement where the app should be restricted to run only within the range - JRE 1.5.0_07 through JRE 1.5.0_17

[j2se version="1.5*"] will not work - it will always launch the app with the latest jre from 1.5 family.

I can request an exact product version by including the href attribute. [j2se version="1.5.0_14" href="http://java.sun.com/products/autodl/j2se"/]

But how do I specify a specific range of JREs in the jnlp file so that JWS picks up a JRE from that range only? So if 1.5.0_07, 1.5.0_17 and JRE 6 are installed, it should run the app on 1.5.0_17.

Is there a good way to accomplish this?

A: 

It's not pretty, but this might work.

<j2se version="1.5.0_07 1.5.0_08 1.5.0_09 1.5.0_10 1.5.0_11 
1.5.0_12 1.5.0_13 1.5.0_14 1.5.0_15 1.5.0_16 1.5.0_17" />

I broke the line so you can read it, but it's all one line in the jnlp.

Gilbert Le Blanc