src/java.base/share/classes/java/lang/System.java
Print this page
@@ -41,10 +41,12 @@
import sun.reflect.CallerSensitive;
import sun.reflect.Reflection;
import sun.security.util.SecurityConstants;
import sun.reflect.annotation.AnnotationType;
import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.misc.JavaLangAccess;;
+import jdk.internal.misc.SharedSecrets;;
/**
* The <code>System</code> class contains several useful class fields
* and methods. It cannot be instantiated.
*
@@ -210,11 +212,11 @@
* @since 1.6
*/
public static Console console() {
if (cons == null) {
synchronized (System.class) {
- cons = sun.misc.SharedSecrets.getJavaIOAccess().console();
+ cons = SharedSecrets.getJavaIOAccess().console();
}
}
return cons;
}
@@ -1214,11 +1216,11 @@
sun.misc.VM.booted();
}
private static void setJavaLangAccess() {
// Allow privileged classes outside of java.lang
- sun.misc.SharedSecrets.setJavaLangAccess(new sun.misc.JavaLangAccess(){
+ SharedSecrets.setJavaLangAccess(new JavaLangAccess(){
public sun.reflect.ConstantPool getConstantPool(Class<?> klass) {
return klass.getConstantPool();
}
public boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType) {
return klass.casAnnotationType(oldType, newType);