使用 java web start (jnlp) 在 Windows XP 上安装了几个 java

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6166786/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 14:38:05  来源:igfitidea点击:

Using java web start (jnlp) with several java installed on Windows XP

javajnlpjava-web-start

提问by Yuri

We have Windows XP with Java 1.5 and Java 1.6 installed. We try to launch JNLP file, there specified required Java version 1.5, like here:

我们有安装了 Java 1.5 和 Java 1.6 的 Windows XP。我们尝试启动 JNLP 文件,其中指定了所需的 Java 版本 1.5,如下所示:

http://java.sun.com/products/autodl/j2se

http://java.sun.com/products/autodl/j2se

After JNLP file is downloaded, appears Java 1.6 window. Then, appears window that certificate is wrong and application doesn't run. If we uninstall Java 1.6, the application runs properly.

下载 JNLP 文件后,会出现 Java 1.6 窗口。然后,出现证书错误且应用程序无法运行的窗口。如果我们卸载 Java 1.6,应用程序可以正常运行。

If we remove the above line from the JNLP file, the application runs with Java 1.6 (but it works wrong, since it was developed for Java 1.5)

如果我们从 JNLP 文件中删除上面的行,应用程序会在 Java 1.6 上运行(但它运行出错,因为它是为 Java 1.5 开发的)

So, it is important to run the application with Java 1.5.

因此,使用 Java 1.5 运行应用程序很重要。

Please suggest how to run this JNLP file with Java 1.5, while Java 1.6 is also installed in the system.

请建议如何使用 Java 1.5 运行此 JNLP 文件,同时系统中还安装了 Java 1.6。

Here is the jnlp file, i just replaced all organization specific titles:

这是 jnlp 文件,我刚刚替换了所有特定于组织的标题:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://server_url"> 
  <information>
    <title> Some title </title>  
    <vendor>Some Vendor</vendor>
    <homepage href="some_ulr" /> 
    <description>Product description</description> 
    <icon kind="splash" href="./splash.gif"/>
  </information>
  <security>
    <all-permissions/>
  </security>

  <application-desc main-class="org.eclipse.core.launcher.WebStartMain">
  </application-desc>

    <resources>
    <j2se version="1.5.0_22" />
    <jar href="http://some_jar"/>
    <jar href="http://some_jar1"/>
    <jar href="http://some_jarN"/>
    <property name="server" value="some_server"/>
    <property name="port" value="8080"/>
    </resources>
</jnlp>

回答by Andrew Thompson

Make sure that 1.5 is enabled in the JNLP Runtime Settings. Also check that the JNLP is valid, using JaNeLAor a DTD/XSD.

确保在JNLP 运行时设置中启用了 1.5 。还要检查 JNLP 是否有效,使用JaNeLA或 DTD/XSD。

enter image description here

在此处输入图片说明

回答by karmakaze

Try using version="1.5+" in your jnlp file.

尝试在 jnlp 文件中使用 version="1.5+"。