在 JWS 启动中拒绝 PropertyPermission 访问 [英] PropertyPermission access denied in JWS launch

查看:18
本文介绍了在 JWS 启动中拒绝 PropertyPermission 访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 web-start 新手,我们正在使用 exe4j 从 One-jar 创建可执行文件.为了制作我们应用程序的网络启动版本",我正在尝试使用指定主类的网络启动来午餐 One-JAR,但我收到以下错误 -

I new to web-start and We are using exe4j to create executable from One-jar. In-order to make a "web start version" of our application I am trying to lunch One-JAR using web start with the specified Main-Class but I am getting the following error -

 java.security.AccessControlException: access denied (java.util.PropertyPermission one-jar.main-class read)
    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.checkPropertyAccess(Unknown Source)
    at java.lang.System.getProperty(Unknown Source)
    at com.simontuffs.onejar.Boot.run(Boot.java:186)
    at com.simontuffs.onejar.Boot.main(Boot.java:137)
    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="" href="">
    <information>
        <title>Applet Takes Params</title>
        <vendor>Protype example</vendor>
    </information>
    <resources>
        <!-- Application Resources -->
        <j2se version="1.5+"
              href="http://java.sun.com/products/autodl/j2se"/>
        <jar href="Application.jar" main="true" />
    </resources>
    <application-desc main-class="com.simontuffs.onejar.Boot">
  </application-desc>
   <update check="background"/>
</jnlp>

我正在尝试直接启动 Application.jarcom.simantuffs.onejar.Boot 是为 JAR 指定的主要类.我还发现这个 link 说我们不能使用 web-start 启动 One-Jar.请帮忙.

I am trying to launch a Application.jar directly and com.simontuffs.onejar.Boot is the main class specify for JAR. I am also found this link that says we can not launch One-Jar with web-start. please help.

推荐答案

access denied (java.util.PropertyPermission one-jar.main-class read)

一个网络启动应用程序.可以访问任何声明 all-permissions 的属性.如果是沙盒,则只能访问以 jnlp 为前缀的属性 &其他一些被视为安全"的 JRE 属性.

A web start app. can access any property if it declares all-permissions. If it is sand-boxed, it can only access properties prefixed with jnlp & some other JRE properties that are considered 'safe'.

这篇关于在 JWS 启动中拒绝 PropertyPermission 访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆