我希望将 RIA 应用程序限制为 java 版本 7 和 8。
<resources os="Windows">
<j2se version="1.7*,1.8*" initial-heap-size="512m" max-heap-size="512m" />
</resources>
我正在尝试做类似上面的事情。我的目标是查看用户是否安装了 java 7 或 8 并使用可用版本运行应用程序。如果用户拥有 1.9 及以上版本,则应用程序不应运行。
这可能吗?如果可以,指定版本的正确语法是什么?
最佳答案
来自documentation :
"The j2se/java element specifies what Java Platform Standard Edition 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."
<java version="1.8" initial-heap-size="512m" max-heap-size="512m" href="http://java.sun.com/products/autodl/j2se"/>
<java version="1.7" initial-heap-size="512m" max-heap-size="512m"/>
另请注意,当指定 href 属性时,会请求特定于供应商的 JRE(在本例中为 Oracle)。如果您不希望弹出安装例程(当没有安装相应的 jre 时),请删除 href="http://java.sun.com/products/autodl/j2se"
链接...
您也可以尝试JaNeLa来自 andrew 验证您的 JNLP 文件...
关于java - 是否可以在 JNLP 文件的 j2se 标记中指定 java 的多个版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55853033/