使用Web Start时可以指定Java U版本吗?

发布于 2024-08-26 12:37:43 字数 739 浏览 1 评论 0原文

我有一个 Java WebStart 应用程序,我想为其指定客户端使用 JRE 1.6.0_17 或更高版本。

在 JNLP 文件中,我尝试添加:

<j2se version="1.6.0_17+"/> 

<j2se version="1.6.0_17"/> 

但是在下载 JNLP 文件时,我收到消息:

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

尽管事实上:

  • “java -version”将计算机上的版本号报告为“1.6.0_17”
  • 更改 jnlp 文件使用并调用“System.getProperty(“java.version”)”报告其实际使用的版本为“1.6.0_17”

查看 spec 第 4.6.1 节表明平台版本和产品版本之间存在一些差异,但我不清楚我将如何使用产品版本(或者即使我应该)。

任何帮助或指示将不胜感激。

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 even if I should).

Any help or pointers would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

渔村楼浪 2024-09-02 12:37:43

当您指定确切的产品版本时,您还必须指定 href 属性。
否则只能指定平台版本(即1.5、1.6)。

使用以下内容应该有效:

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

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"/>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文