开发者

Is it possible to specify the Java U version when using Web Start?

开发者 https://www.devze.com 2022-12-24 17:10 出处:网络
I have a Java WebStart application for which I want to specify that the client use JRE 1.6.0_17 or later.

I have a Java WebStart application for which I want to specify that the client use JRE 1.6.0_17 or later.

To the JNLP file I've tried adding:

<j2se version="1.6.0_17+"/> 

or

<j2se version="1.6.0_17"/> 

But when downloading JNLP file I'm given 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 machine as "1.6.0_17"
  • Changing the jnlp file to use and calling "System.getProperty("java.version")" reports the version that it is actually using to be "1.6.0_17"

Looking through the spec section 4.6.1 indicates that there is some difference between platform version and product version, but it isn't clear to me how I would go about using the product version (or e开发者_高级运维ven if I should).

Any help or pointers would be appreciated.


When you specify an exact product version, you have to specify the href attribute too. 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"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号