Can I specify the version of Java U when using Web Start?

I have a Java WebStart application for which I want to indicate that the client is using JRE 1.6.0_17 or later.

I tried to add to the JNLP file:

<j2se version="1.6.0_17+"/> 

or

 <j2se version="1.6.0_17"/> 

But when loading the JNLP file, I get the message:

 "The application has requested a version of the JRE(version 1.6.0_17) that is not installed" 

despite the fact that:

  • "java -version" reports the version number on the computer as "1.6.0_17"
  • Changing the jnlp file to use and call "System.getProperty (" java.version ")" tells the version that is actually being used "1.6.0_17"

Looking through the spec , section 4.6.1 indicates that there is some difference between the platform version and the product version, but it isn’t clear to me how I will use the product version (or even if I should).

Any help or pointers would be appreciated.

+4
source share
1 answer

When you specify the exact version of the product, you must also specify the href attribute. Otherwise, you can only specify the platform version (i.e. 1.5, 1.6).

Using the following should work:

 <j2se version="1.6.0_17" href="http://java.sun.com/products/autodl/j2se"/> 
+3
source

Source: https://habr.com/ru/post/1304991/


All Articles