@@ -85,7 +85,6 @@ char* Arguments::_java_command = nullptr;
85
85
SystemProperty* Arguments::_system_properties = nullptr ;
86
86
size_t Arguments::_conservative_max_heap_alignment = 0 ;
87
87
Arguments::Mode Arguments::_mode = _mixed;
88
- bool Arguments::_java_compiler = false ;
89
88
bool Arguments::_xdebug_mode = false ;
90
89
const char * Arguments::_java_vendor_url_bug = nullptr ;
91
90
const char * Arguments::_sun_java_launcher = DEFAULT_JAVA_LAUNCHER;
@@ -1266,8 +1265,14 @@ bool Arguments::add_property(const char* prop, PropertyWriteable writeable, Prop
1266
1265
#endif
1267
1266
1268
1267
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
+ }
1271
1276
} else if (strcmp (key, " sun.java.launcher.is_altjvm" ) == 0 ) {
1272
1277
// sun.java.launcher.is_altjvm property is
1273
1278
// private and is processed in process_sun_java_launcher_properties();
@@ -1372,7 +1377,6 @@ void Arguments::set_mode_flags(Mode mode) {
1372
1377
// Set up default values for all flags.
1373
1378
// If you add a flag to any of the branches below,
1374
1379
// add a default value for it here.
1375
- set_java_compiler (false );
1376
1380
_mode = mode;
1377
1381
1378
1382
// Ensure Agent_OnLoad has the correct initial values.
@@ -1862,16 +1866,6 @@ jint Arguments::set_aggressive_opts_flags() {
1862
1866
}
1863
1867
1864
1868
// ===========================================================================================================
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
- }
1875
1869
1876
1870
void Arguments::process_java_launcher_argument (const char * launcher, void * extra_info) {
1877
1871
if (_sun_java_launcher != _default_java_launcher) {
@@ -3004,15 +2998,6 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
3004
2998
}
3005
2999
}
3006
3000
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
-
3016
3001
// CompileThresholdScaling == 0.0 is same as -Xint: Disable compilation (enable interpreter-only mode),
3017
3002
// but like -Xint, leave compilation thresholds unaffected.
3018
3003
// With tiered compilation disabled, setting CompileThreshold to 0 disables compilation as well.
0 commit comments