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

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

问题描述

我是web-start的新手,我们正在使用exe4j从One-jar创建可执行文件。为了使我们的应用程序的Web启动版本我尝试使用指定的Main-Class的web启动午餐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包含 -

JNLP contains --

    <?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.jar com.simontuffs.onejar.Boot 是为JAR指定的主类。我也发现这个链接说我们不能通过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天全站免登陆