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