equal
deleted
inserted
replaced
26 package sun.management; |
26 package sun.management; |
27 |
27 |
28 import java.util.*; |
28 import java.util.*; |
29 import com.sun.management.VMOption; |
29 import com.sun.management.VMOption; |
30 import com.sun.management.VMOption.Origin; |
30 import com.sun.management.VMOption.Origin; |
|
31 import java.security.AccessController; |
31 |
32 |
32 /** |
33 /** |
33 * Flag class is a helper class for constructing a VMOption. |
34 * Flag class is a helper class for constructing a VMOption. |
34 * It has the static methods for getting the Flag objects, each |
35 * It has the static methods for getting the Flag objects, each |
35 * corresponds to one VMOption. |
36 * corresponds to one VMOption. |
113 static synchronized native void setDoubleValue(String name, double value); |
114 static synchronized native void setDoubleValue(String name, double value); |
114 static synchronized native void setBooleanValue(String name, boolean value); |
115 static synchronized native void setBooleanValue(String name, boolean value); |
115 static synchronized native void setStringValue(String name, String value); |
116 static synchronized native void setStringValue(String name, String value); |
116 |
117 |
117 static { |
118 static { |
|
119 AccessController.doPrivileged( |
|
120 new java.security.PrivilegedAction<Void>() { |
|
121 public Void run() { |
|
122 System.loadLibrary("management"); |
|
123 return null; |
|
124 } |
|
125 }); |
118 initialize(); |
126 initialize(); |
119 } |
127 } |
120 private static native void initialize(); |
128 private static native void initialize(); |
121 } |
129 } |