我是Web入门的新手,我们使用exe4j从One-jar创建可执行文件。为了制作我们应用程序的“网络启动版本”,我尝试使用具有指定Main- Class的网络启动功能对One-JAR进行午餐,但是出现以下错误-
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.jar ,而 com.simontuffs.onejar.Boot 是为JAR指定的主要类。我还发现此链接表明我们无法通过网络启动来启动One-Jar。请帮忙。
access denied (java.util.PropertyPermission one-jar.main-class read)
网路启动应用程式。可以声明任何属性all-permissions。如果是沙盒,则只能访问以jnlp&为前缀的属性以及一些其他“安全” JRE属性。
all-permissions
jnlp