8064288: sun.management.Flag should loadLibrary()
Call System.loadLibrary("management") from Flag static initializer Reviewed-by: mchung
This commit is contained in:
parent
d5edf27b6a
commit
f4aff42708
@ -28,6 +28,7 @@ package sun.management;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import com.sun.management.VMOption;
|
import com.sun.management.VMOption;
|
||||||
import com.sun.management.VMOption.Origin;
|
import com.sun.management.VMOption.Origin;
|
||||||
|
import java.security.AccessController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag class is a helper class for constructing a VMOption.
|
* Flag class is a helper class for constructing a VMOption.
|
||||||
@ -115,6 +116,13 @@ class Flag {
|
|||||||
static synchronized native void setStringValue(String name, String value);
|
static synchronized native void setStringValue(String name, String value);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
AccessController.doPrivileged(
|
||||||
|
new java.security.PrivilegedAction<Void>() {
|
||||||
|
public Void run() {
|
||||||
|
System.loadLibrary("management");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
private static native void initialize();
|
private static native void initialize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user