简体   繁体   中英

Trouble with Java Web Start

Trying to run my program through java web start. I get the following exception in the output console. Im new to java web start so do any of you have any ideas?

FYI, here is line 66

ConfigFileReader cfg = new ConfigFileReader(BCApp.getConfigFileLocation());

java.lang.reflect.InvocationTargetException
    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)
Caused by: java.lang.ExceptionInInitializerError
    at JCS.Main$setStyle.setStyle(Main.java:66)
    at JCS.Main.main(Main.java:57)
    ... 9 more
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission java.io.tmpdir 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 GUI.BCApp.(BCApp.java:60)
    ... 11 more

You are going to want to read up on the security manager . Because code launched through Java Web Start could potentially cause grave harm to client computers there are a lot of things it is usually not allowed to do. File system access is one of them. There are several ways to enable your Java Web Start app to access the file system detailed in the documentation.

您的WS应用程序在安全沙箱环境中运行,这意味着它无法访问文件系统,除非a)您的应用程序已进行数字签名或b)您可以修改安全设置(不建议使用btw)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM