0

我正在尝试使用 Java Web Start 运行 Eclipse RCP 应用程序。但是,我在下载并运行应用程序后遇到此错误:

组件中的 JNLP JREDesc 被忽略:null

之后,应用程序关闭。解决方法是什么?

这是我的主要 JNLP 文件:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/demoui-webstart/" href="start.jnlp"> 
  <information> 
    <title> Demo UI Application </title>  
    <vendor>Me</vendor>
    <homepage href="http://www.me.org" />
    <description>description</description> 
    <offline-allowed/>
  </information>

  <security>
    <all-permissions/>
  </security>

  <resources>
    <j2se version="1.7+"/>
    <jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"/>
    <extension name="Wrapper feature" href="features/org.test.webstart.demo.wrapperfeature_0.1.0.jnlp"/>

    <property name="osgi.instance.area" value="@user.home/Application Data/demoui-rcp"/>
    <property name="osgi.configuration.area" value="@user.home/Application Data/demoui-rcp"/>

    <property name="eclipse.application" value="org.test.webstart.demo.plugin.application"/>
  </resources>

  <application-desc main-class="org.eclipse.equinox.launcher.WebStartMain">
    <argument>-nosplash</argument>
  </application-desc>
</jnlp>

org.test.webstart.demo.wrapperfeature_0.1.0.jnlp

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/demoui-webstart/">
    <information>
        <title>Wrapperfeature</title>
        <vendor>Me</vendor>
        <offline-allowed/>
    </information>
    <resources>
        <j2se version="1.7+" />
        <jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"/>
        <extension href="features/org.test.webstart.demo.feature_0.1.0.jnlp" />
    </resources>
    <component-desc/>
</jnlp>

org.test.webstart.demo.feature_0.1.0.jnlp

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/demoui-webstart/">
    <information>
        <title>Feature</title>
        <vendor>Me</vendor>
        <offline-allowed/>
    </information>
    <security>
        <all-permissions/>
    </security>

    <resources>
        <j2se version="1.7+" />
        <jar href="plugins/org.test.webstart.demo.plugin_0.1.0.jar"/>
        <extension href="features/org.eclipse.rcp_3.7.2.v20120120-1424-9DB5FmnFq5JCf1UA38R-kz0S0272.jnlp" />
    </resources>
    <component-desc/>
</jnlp>

org.eclipse.rcp_3.7.2.v20120120-1424-9DB5FmnFq5JCf1UA38R-kz0S0272

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/demoui-webstart/">
    <information>
        <title>Eclipse RCP</title>
        <vendor>Eclipse.org</vendor>
        <offline-allowed/>
    </information>
    <security>
        <all-permissions/>
    </security>
    <component-desc/>
    <resources>
        <j2se version="1.7+" />
    </resources>
    <resources>
        <jar href="plugins/com.ibm.icu_4.4.2.v20110823.jar"/>
        <jar href="plugins/org.eclipse.core.commands_3.6.0.I20110111-0800.jar"/>
        <jar href="plugins/org.eclipse.core.databinding_1.4.0.I20110111-0800.jar"/>
        <jar href="plugins/org.eclipse.core.databinding.observable_1.4.0.I20110222-0800.jar"/>
        <jar href="plugins/org.eclipse.core.databinding.property_1.4.0.I20110222-0800.jar"/>
        <jar href="plugins/org.eclipse.core.databinding.beans_1.2.100.I20100824-0800.jar"/>
        <jar href="plugins/org.eclipse.core.jobs_3.5.101.v20120113-1953.jar"/>
        <jar href="plugins/org.eclipse.core.expressions_3.4.300.v20110228.jar"/>
        <jar href="plugins/org.eclipse.core.runtime_3.7.0.v20110110.jar"/>
        <jar href="plugins/org.eclipse.core.runtime.compatibility.auth_3.2.200.v20110110.jar"/>
        <jar href="plugins/org.eclipse.osgi_3.7.2.v20120110-1415.jar"/>
        <jar href="plugins/org.eclipse.osgi.services_3.3.0.v20110513.jar"/>
        <jar href="plugins/org.eclipse.help_3.5.100.v20110426.jar"/>
        <jar href="plugins/org.eclipse.swt_3.7.2.v3740f.jar"/>
        <jar href="plugins/org.eclipse.jface_3.7.0.v20110928-1505.jar"/>
        <jar href="plugins/org.eclipse.jface.databinding_1.5.0.I20100907-0800.jar"/>
        <jar href="plugins/org.eclipse.ui_3.7.0.v20110928-1505.jar"/>
        <jar href="plugins/org.eclipse.ui.workbench_3.7.1.v20120104-1859.jar"/>
    </resources>
    <resources os="Mac">
        <jar href="plugins/org.eclipse.ui.carbon_4.0.100.I20101109-0800.jar"/>
    </resources>
    <resources os="Mac">
        <jar href="plugins/org.eclipse.ui.cocoa_1.1.0.I20101109-0800.jar"/>
    </resources>
    <resources>
        <jar href="plugins/org.eclipse.update.configurator_3.3.100.v20100512.jar"/>
        <jar href="plugins/org.eclipse.equinox.simpleconfigurator_1.0.200.v20110815-1438.jar"/>
    </resources>
    <resources os="Windows" arch="x86">
        <jar href="plugins/org.eclipse.swt.win32.win32.x86_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Windows" arch="x86_64">
        <jar href="plugins/org.eclipse.swt.win32.win32.x86_64_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Linux" arch="x86">
        <jar href="plugins/org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Linux" arch="s390x">
        <jar href="plugins/org.eclipse.swt.gtk.linux.s390x_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Linux" arch="s390">
        <jar href="plugins/org.eclipse.swt.gtk.linux.s390_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Solaris" arch="sparc">
        <jar href="plugins/org.eclipse.swt.gtk.solaris.sparc_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Solaris" arch="x86">
        <jar href="plugins/org.eclipse.swt.gtk.solaris.x86_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Linux" arch="ppc64">
        <jar href="plugins/org.eclipse.swt.gtk.linux.ppc64_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Linux" arch="x86_64">
        <jar href="plugins/org.eclipse.swt.gtk.linux.x86_64_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Mac" arch="ppc">
        <jar href="plugins/org.eclipse.swt.carbon.macosx_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Mac" arch="x86">
        <jar href="plugins/org.eclipse.swt.carbon.macosx_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Mac" arch="ppc">
        <jar href="plugins/org.eclipse.swt.cocoa.macosx_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Mac" arch="x86">
        <jar href="plugins/org.eclipse.swt.cocoa.macosx_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="Mac" arch="x86_64">
        <jar href="plugins/org.eclipse.swt.cocoa.macosx.x86_64_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="AIX" arch="ppc">
        <jar href="plugins/org.eclipse.swt.gtk.aix.ppc_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="AIX" arch="ppc64">
        <jar href="plugins/org.eclipse.swt.gtk.aix.ppc64_3.7.2.v3740f.jar"/>
    </resources>
    <resources os="HP-UX" arch="ia64_32">
        <jar href="plugins/org.eclipse.swt.gtk.hpux.ia64_32_3.7.2.v3740f.jar"/>
    </resources>
    <resources>
        <jar href="plugins/org.eclipse.rcp_3.7.2.v201202080800.jar"/>
        <jar href="plugins/org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar"/>
        <jar href="plugins/org.eclipse.equinox.app_1.3.100.v20110321.jar"/>
        <jar href="plugins/org.eclipse.equinox.common_3.6.0.v20110523.jar"/>
        <jar href="plugins/org.eclipse.equinox.ds_1.3.1.R37x_v20110701.jar"/>
        <jar href="plugins/org.eclipse.equinox.util_1.0.300.v20110502.jar"/>
        <jar href="plugins/org.eclipse.equinox.preferences_3.4.2.v20120111-2020.jar"/>
        <jar href="plugins/org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611.jar"/>
        <jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"/>
    </resources>
    <resources os="Solaris" arch="sparc">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc_1.1.100.v20110505.jar"/>
    </resources>
    <resources os="Solaris" arch="x86">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.solaris.x86_1.1.100.v20110505.jar"/>
    </resources>
    <resources os="Mac" arch="ppc">
        <jar href="plugins/org.eclipse.equinox.launcher.carbon.macosx_1.1.100.v20110502.jar"/>
    </resources>
    <resources os="Mac" arch="x86">
        <jar href="plugins/org.eclipse.equinox.launcher.carbon.macosx_1.1.100.v20110502.jar"/>
    </resources>
    <resources os="Mac" arch="ppc">
        <jar href="plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.101.v20120109-1504.jar"/>
    </resources>
    <resources os="Mac" arch="x86">
        <jar href="plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.101.v20120109-1504.jar"/>
    </resources>
    <resources os="Mac" arch="x86_64">
        <jar href="plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.101.v20120109-1504.jar"/>
    </resources>
    <resources os="Linux" arch="ppc64">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64_1.0.100.v20110505.jar"/>
    </resources>
    <resources os="Linux" arch="x86">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.100.v20110505.jar"/>
    </resources>
    <resources os="Linux" arch="s390x">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.s390x_1.1.100.v20110505.jar"/>
    </resources>
    <resources os="Linux" arch="s390">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.s390_1.1.100.v20110505.jar"/>
    </resources>
    <resources os="Linux" arch="x86_64">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505.jar"/>
    </resources>
    <resources os="AIX" arch="ppc">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.aix.ppc_1.1.0.v20110530.jar"/>
    </resources>
    <resources os="AIX" arch="ppc64">
        <jar href="plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64_1.1.0.v20110530.jar"/>
    </resources>
    <resources os="Windows" arch="x86">
        <jar href="plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502.jar"/>
    </resources>
    <resources os="Windows" arch="x86_64">
        <jar href="plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502.jar"/>
    </resources>
</jnlp>
4

2 回答 2

1

1.7 还没有准备好生产。可能是您在实现中发现了一个错误。


组件中的 JNLP JREDesc 被忽略:null

这是因为声明:

 <j2se version="1.7+" />

在每个扩展中。加载扩展时,JRE 已被选择并正在运行,它取决于主启动文件中指定的版本,以确保应用程序的正确版本。(和所有扩展名)。

实际上,我发现令人沮丧的是,这将是一种向扩展用户指示所需最低版本的简单方法。OTOH,您可以改为发表评论。

于 2012-04-20T02:38:13.780 回答
0

关于这个问题的几个问题(我有同样的问题):

  • “组件中的 JNLP JREDesc 被忽略:null”只是一个信息,不是问题。它在多个 jnlp 文件声明一个 j2se 版本时显示。第一个被拿走了。

  • 如果 webstart 正在关闭,这可能是由于另一个错误。尝试通过以下方式找出错误:打开文件$HOME/.java/deployment/deployment.properties并设置deployment.javaws.logToFile=truedeployment.javaws.logFileName=LOG_FILE。重新启动您的 webstart 应用程序,然后阅读您的日志文件LOG_FILE以查看控制台无法显示的实际问题(因为它关闭得很快)。

  • 然后,即使 webstart 机制工作正常,您的 Eclipse RCP 应用程序也可能无法正常工作。在这种情况下,您的 LOG_FILE 显示没有问题,但请注意在您的 jnlp 文件中使用“ osgi.instance.area ”指定的目录。在那里查找.metadata/.log文件或任何其他日志文件。然后,您应该尝试解决 eclipse rcp 问题,如果这些日志文件中有任何显示。

  • 顺便说一句,在可能的情况下,我尝试了一个 Eclipse RCP 4 应用程序。要使用 Webstart 运行 RCP 4 应用程序,您必须将以下属性添加到您的主 jnlp 文件(在资源标签下),以确保以一致的方式加载一些重要的插件:

    <property name="osgi.bundles"
         value="org.eclipse.core.runtime@4:start,
                org.eclipse.equinox.common@3:start,
                org.eclipse.equinox.ds@2:start,org.
                eclipse.equinox.simpleconfigurator@1:start">
    
于 2013-03-14T15:57:44.503 回答