@@ -85,7 +85,6 @@ char* Arguments::_java_command = nullptr;
8585SystemProperty* Arguments::_system_properties = nullptr ;
8686size_t Arguments::_conservative_max_heap_alignment = 0 ;
8787Arguments::Mode Arguments::_mode = _mixed;
88- bool Arguments::_java_compiler = false ;
8988bool Arguments::_xdebug_mode = false ;
9089const char * Arguments::_java_vendor_url_bug = nullptr ;
9190const char * Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER;
@@ -1266,8 +1265,14 @@ bool Arguments::add_property(const char* prop, PropertyWriteable writeable, Prop
12661265#endif
12671266
12681267 if (strcmp (key, " java.compiler" ) == 0 ) {
1269- process_java_compiler_argument (value);
1270- // Record value in Arguments, but let it get passed to Java.
1268+ // we no longer support java.compiler system property, log a warning and let it get
1269+ // passed to Java, like any other system property
1270+ if (strlen (value) == 0 || strcasecmp (value, " NONE" ) == 0 ) {
1271+ // for applications using NONE or empty value, log a more informative message
1272+ warning (" The java.compiler system property is obsolete and no longer supported, use -Xint" );
1273+ } else {
1274+ warning (" The java.compiler system property is obsolete and no longer supported." );
1275+ }
12711276 } else if (strcmp (key, " sun.java.launcher.is_altjvm" ) == 0 ) {
12721277 // sun.java.launcher.is_altjvm property is
12731278 // private and is processed in process_sun_java_launcher_properties();
@@ -1372,7 +1377,6 @@ void Arguments::set_mode_flags(Mode mode) {
13721377 // Set up default values for all flags.
13731378 // If you add a flag to any of the branches below,
13741379 // add a default value for it here.
1375- set_java_compiler (false );
13761380 _mode = mode;
13771381
13781382 // Ensure Agent_OnLoad has the correct initial values.
@@ -1862,16 +1866,6 @@ jint Arguments::set_aggressive_opts_flags() {
18621866}
18631867
18641868// ===========================================================================================================
1865- // Parsing of java.compiler property
1866-
1867- void Arguments::process_java_compiler_argument (const char * arg) {
1868- // For backwards compatibility, Djava.compiler=NONE or ""
1869- // causes us to switch to -Xint mode UNLESS -Xdebug
1870- // is also specified.
1871- if (strlen (arg) == 0 || strcasecmp (arg, " NONE" ) == 0 ) {
1872- set_java_compiler (true ); // "-Djava.compiler[=...]" most recently seen.
1873- }
1874- }
18751869
18761870void Arguments::process_java_launcher_argument (const char * launcher, void * extra_info) {
18771871 if (_sun_java_launcher != _default_java_launcher) {
@@ -3004,15 +2998,6 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
30042998 }
30052999 }
30063000
3007- // This must be done after all arguments have been processed.
3008- // java_compiler() true means set to "NONE" or empty.
3009- if (java_compiler () && !xdebug_mode ()) {
3010- // For backwards compatibility, we switch to interpreted mode if
3011- // -Djava.compiler="NONE" or "" is specified AND "-Xdebug" was
3012- // not specified.
3013- set_mode_flags (_int);
3014- }
3015-
30163001 // CompileThresholdScaling == 0.0 is same as -Xint: Disable compilation (enable interpreter-only mode),
30173002 // but like -Xint, leave compilation thresholds unaffected.
30183003 // With tiered compilation disabled, setting CompileThreshold to 0 disables compilation as well.
0 commit comments