Relates :
|
$ java -Djava.security.manager -Djava.security.policy=./test.policy HelloWorld Exception in thread "main" java.security.AccessControlException: access denied ("java.util.PropertyPermission" "user.dir" "read") at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457) at java.security.AccessController.checkPermission(AccessController.java:884) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294) at java.lang.System.getProperty(System.java:714) at java.io.UnixFileSystem.resolve(UnixFileSystem.java:133) at java.io.File.getCanonicalPath(File.java:618) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1875) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1119) at HelloWorld.<init>(HelloWorld.java:5) at HelloWorld.main(HelloWorld.java:25)