user489041
user489041

Reputation: 28312

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

Upvotes: 1

Views: 2034

Answers (2)

bioffe
bioffe

Reputation: 6413

Your WS application runs from a security sandbox environment, which means it doesn't have an access to the file system, unless a) your app is digitally signed or b) you can modify your security settings (which is not recommended btw).

Upvotes: 1

justkt
justkt

Reputation: 14776

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.

Upvotes: 2

Related Questions