JDK-8047904 : Runtime.loadLibrary throws SecurityException when security manager is installed
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-06-23
  • Updated: 2016-06-13
  • Resolved: 2014-06-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b22Fixed
Related Reports
Relates :  
Description
$ 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)