# HG changeset patch # User bchristi # Date 1416001579 28800 # Node ID 8a0caceb319b21c43ee337cfab4ece59993a8986 # Parent 7d9f5cd9d441dda2243fc98ab21dce11e4725cf3 8064288: sun.management.Flag should loadLibrary() Summary: Call System.loadLibrary("management") from Flag static initializer Reviewed-by: mchung diff -r 7d9f5cd9d441 -r 8a0caceb319b jdk/src/java.management/share/classes/sun/management/Flag.java --- a/jdk/src/java.management/share/classes/sun/management/Flag.java Thu Nov 20 10:58:03 2014 -0800 +++ b/jdk/src/java.management/share/classes/sun/management/Flag.java Fri Nov 14 13:46:19 2014 -0800 @@ -28,6 +28,7 @@ import java.util.*; import com.sun.management.VMOption; import com.sun.management.VMOption.Origin; +import java.security.AccessController; /** * Flag class is a helper class for constructing a VMOption. @@ -115,6 +116,13 @@ static synchronized native void setStringValue(String name, String value); static { + AccessController.doPrivileged( + new java.security.PrivilegedAction<Void>() { + public Void run() { + System.loadLibrary("management"); + return null; + } + }); initialize(); } private static native void initialize();