升级到java 7u72后,Web启动应用程序无法启动

时间:2014-10-16 19:14:34

标签: java java-web-start

我正在开发一个rcp应用程序,它作为Web启动应用程序分发。它在java 7u65上工作,但升级到7u72后,它不再工作了。应用程序使用受信任的证书和权限进行签名:all-permissions和codebase:*属性将添加到清单文件中。并且jnlp模板文件在启动程序jar文件中签名。在日志文件中打印以下错误:

java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")
            at java.security.AccessControlContext.checkPermission(Unknown Source)
            at java.security.AccessController.checkPermission(Unknown Source)
            at java.lang.SecurityManager.checkPermission(Unknown Source)
            at java.lang.SecurityManager.checkPropertiesAccess(Unknown Source)
            at java.lang.System.getProperties(Unknown Source)
            at org.eclipse.equinox.launcher.Main.takeDownSplash(Main.java:1942)
            at org.eclipse.equinox.launcher.Main$SplashHandler.run(Main.java:109)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:183)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
            at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
            at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:79)
            at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
            at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:57)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.sun.javaws.Launcher.executeApplication(Unknown Source)
            at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
            at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
            at com.sun.javaws.Launcher.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)

我和jnlp启动器文件是:

    <?xml version="1.0" encoding="UTF-8"?>
<jnlp 
    spec="1.0+" 
    codebase="http://demo:8080/app" 
    href=""> <!-- Burasi bos olmali !!! URL to the site containing the jnlp application. It should match the value used on  export. Href, the name of this file -->
  <information>
    <title> Title </title>  
    <vendor>Company</vendor>
    <homepage href="" /> 
    <description>Product name</description> 
    <icon kind="splash" href="splash.bmp"/>
  </information>

  <!--request all permissions from the application. This does not change-->
  <security>
    <all-permissions/> 
  </security>

  <!-- The name of the main class to execute. This does not change-->
 <application-desc main-class="org.eclipse.equinox.launcher.WebStartMain">
    <argument>-showsplash</argument>
  </application-desc>
    <resources>
        <j2se version="1.6+"/>
        <jar href="plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar"/>
        <extension name="wrap feature" href="features/app.feature_jnlp.jnlp" />
        <!-- OSGI setup -->
        <property name="osgi.instance.area" value="@user.home/instance/"/>
        <property name="osgi.configuration.area" value="@user.home/config/"/>
        <property name="osgi.install.area" value="@user.home/"/> 
        <property name="eclipse.product" value="app.id"/>
        <property name="eclipse.application" value="app"/>
        <property name="osgi.splashPath" value="platform:/base/plugins/app"/>
        <property name="osgi.nl" value="tr"/> 
    </resources>

</jnlp>

由于

1 个答案:

答案 0 :(得分:1)

经过一周的痛苦!

<property name="jnlp.eclipse.security" value="osgi"/>

添加此属性对我们有用。

jnlp是我们的前缀,因此在您的示例中,您只需要eclipse.security作为属性名称。

所以下面应该这样做。

<property name="eclipse.security" value="osgi"/>

请参阅参考资料。 https://www.eclipse.org/forums/index.php/m/1454553/#msg_1454553