3038 warning("java.lang.System not initialized");
3039 }
3040
3041 // an instance of OutOfMemory exception has been allocated earlier
3042 if (InitializeJavaLangExceptionsErrors) {
3043 initialize_class(vmSymbolHandles::java_lang_OutOfMemoryError(), CHECK_0);
3044 initialize_class(vmSymbolHandles::java_lang_NullPointerException(), CHECK_0);
3045 initialize_class(vmSymbolHandles::java_lang_ClassCastException(), CHECK_0);
3046 initialize_class(vmSymbolHandles::java_lang_ArrayStoreException(), CHECK_0);
3047 initialize_class(vmSymbolHandles::java_lang_ArithmeticException(), CHECK_0);
3048 initialize_class(vmSymbolHandles::java_lang_StackOverflowError(), CHECK_0);
3049 initialize_class(vmSymbolHandles::java_lang_IllegalMonitorStateException(), CHECK_0);
3050 } else {
3051 warning("java.lang.OutOfMemoryError has not been initialized");
3052 warning("java.lang.NullPointerException has not been initialized");
3053 warning("java.lang.ClassCastException has not been initialized");
3054 warning("java.lang.ArrayStoreException has not been initialized");
3055 warning("java.lang.ArithmeticException has not been initialized");
3056 warning("java.lang.StackOverflowError has not been initialized");
3057 }
3058 }
3059
3060 // See : bugid 4211085.
3061 // Background : the static initializer of java.lang.Compiler tries to read
3062 // property"java.compiler" and read & write property "java.vm.info".
3063 // When a security manager is installed through the command line
3064 // option "-Djava.security.manager", the above properties are not
3065 // readable and the static initializer for java.lang.Compiler fails
3066 // resulting in a NoClassDefFoundError. This can happen in any
3067 // user code which calls methods in java.lang.Compiler.
3068 // Hack : the hack is to pre-load and initialize this class, so that only
3069 // system domains are on the stack when the properties are read.
3070 // Currently even the AWT code has calls to methods in java.lang.Compiler.
3071 // On the classic VM, java.lang.Compiler is loaded very early to load the JIT.
3072 // Future Fix : the best fix is to grant everyone permissions to read "java.compiler" and
3073 // read and write"java.vm.info" in the default policy file. See bugid 4211383
3074 // Once that is done, we should remove this hack.
3075 initialize_class(vmSymbolHandles::java_lang_Compiler(), CHECK_0);
3076
3077 // More hackery - the static initializer of java.lang.Compiler adds the string "nojit" to
|
3038 warning("java.lang.System not initialized");
3039 }
3040
3041 // an instance of OutOfMemory exception has been allocated earlier
3042 if (InitializeJavaLangExceptionsErrors) {
3043 initialize_class(vmSymbolHandles::java_lang_OutOfMemoryError(), CHECK_0);
3044 initialize_class(vmSymbolHandles::java_lang_NullPointerException(), CHECK_0);
3045 initialize_class(vmSymbolHandles::java_lang_ClassCastException(), CHECK_0);
3046 initialize_class(vmSymbolHandles::java_lang_ArrayStoreException(), CHECK_0);
3047 initialize_class(vmSymbolHandles::java_lang_ArithmeticException(), CHECK_0);
3048 initialize_class(vmSymbolHandles::java_lang_StackOverflowError(), CHECK_0);
3049 initialize_class(vmSymbolHandles::java_lang_IllegalMonitorStateException(), CHECK_0);
3050 } else {
3051 warning("java.lang.OutOfMemoryError has not been initialized");
3052 warning("java.lang.NullPointerException has not been initialized");
3053 warning("java.lang.ClassCastException has not been initialized");
3054 warning("java.lang.ArrayStoreException has not been initialized");
3055 warning("java.lang.ArithmeticException has not been initialized");
3056 warning("java.lang.StackOverflowError has not been initialized");
3057 }
3058
3059 if (EnableInvokeDynamic) {
3060 // JSR 292: An intialized java.dyn.InvokeDynamic is required in
3061 // the compiler.
3062 initialize_class(vmSymbolHandles::java_dyn_InvokeDynamic(), CHECK_0);
3063 }
3064 }
3065
3066 // See : bugid 4211085.
3067 // Background : the static initializer of java.lang.Compiler tries to read
3068 // property"java.compiler" and read & write property "java.vm.info".
3069 // When a security manager is installed through the command line
3070 // option "-Djava.security.manager", the above properties are not
3071 // readable and the static initializer for java.lang.Compiler fails
3072 // resulting in a NoClassDefFoundError. This can happen in any
3073 // user code which calls methods in java.lang.Compiler.
3074 // Hack : the hack is to pre-load and initialize this class, so that only
3075 // system domains are on the stack when the properties are read.
3076 // Currently even the AWT code has calls to methods in java.lang.Compiler.
3077 // On the classic VM, java.lang.Compiler is loaded very early to load the JIT.
3078 // Future Fix : the best fix is to grant everyone permissions to read "java.compiler" and
3079 // read and write"java.vm.info" in the default policy file. See bugid 4211383
3080 // Once that is done, we should remove this hack.
3081 initialize_class(vmSymbolHandles::java_lang_Compiler(), CHECK_0);
3082
3083 // More hackery - the static initializer of java.lang.Compiler adds the string "nojit" to
|