How to specify a JRE range in jnlp file?

前端 未结 2 1358
心在旅途
心在旅途 2020-12-17 22:34

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.

相关标签:
2条回答
  • 2020-12-17 22:45

    I think what you want is:

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

    See: http://docs.oracle.com/javase/1.5.0/docs/guide/javaws/developersguide/syntax.html#resources

    The j2se element specifies what Java 2 SE Runtime Environment (JRE) versions an application is supported on, as well as standard parameters to the Java Virtual Machine. If several JREs are specified, this indicates a prioritized list of the supported JREs, with the most preferred version first.

    I've also looked at the Java 6 / Java 7 at it looks like it will work there as well.

    http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#resources

    http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html#resources

    0 讨论(0)
  • 2020-12-17 22:49

    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.

    0 讨论(0)
提交回复
热议问题