src/hotspot/share/runtime/arguments.cpp
changeset 58280 ef8c8cf9256a
parent 58130 ff0eae1719d0
child 58282 03fce7b04b42
equal deleted inserted replaced
58279:448fe2bfd505 58280:ef8c8cf9256a
    80 Arguments::Mode Arguments::_mode                = _mixed;
    80 Arguments::Mode Arguments::_mode                = _mixed;
    81 bool   Arguments::_java_compiler                = false;
    81 bool   Arguments::_java_compiler                = false;
    82 bool   Arguments::_xdebug_mode                  = false;
    82 bool   Arguments::_xdebug_mode                  = false;
    83 const char*  Arguments::_java_vendor_url_bug    = DEFAULT_VENDOR_URL_BUG;
    83 const char*  Arguments::_java_vendor_url_bug    = DEFAULT_VENDOR_URL_BUG;
    84 const char*  Arguments::_sun_java_launcher      = DEFAULT_JAVA_LAUNCHER;
    84 const char*  Arguments::_sun_java_launcher      = DEFAULT_JAVA_LAUNCHER;
    85 int    Arguments::_sun_java_launcher_pid        = -1;
       
    86 bool   Arguments::_sun_java_launcher_is_altjvm  = false;
    85 bool   Arguments::_sun_java_launcher_is_altjvm  = false;
    87 
    86 
    88 // These parameters are reset in method parse_vm_init_args()
    87 // These parameters are reset in method parse_vm_init_args()
    89 bool   Arguments::_AlwaysCompileLoopMethods     = AlwaysCompileLoopMethods;
    88 bool   Arguments::_AlwaysCompileLoopMethods     = AlwaysCompileLoopMethods;
    90 bool   Arguments::_UseOnStackReplacement        = UseOnStackReplacement;
    89 bool   Arguments::_UseOnStackReplacement        = UseOnStackReplacement;
   359   return false;
   358   return false;
   360 }
   359 }
   361 
   360 
   362 // Process java launcher properties.
   361 // Process java launcher properties.
   363 void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) {
   362 void Arguments::process_sun_java_launcher_properties(JavaVMInitArgs* args) {
   364   // See if sun.java.launcher, sun.java.launcher.is_altjvm or
   363   // See if sun.java.launcher or sun.java.launcher.is_altjvm is defined.
   365   // sun.java.launcher.pid is defined.
       
   366   // Must do this before setting up other system properties,
   364   // Must do this before setting up other system properties,
   367   // as some of them may depend on launcher type.
   365   // as some of them may depend on launcher type.
   368   for (int index = 0; index < args->nOptions; index++) {
   366   for (int index = 0; index < args->nOptions; index++) {
   369     const JavaVMOption* option = args->options + index;
   367     const JavaVMOption* option = args->options + index;
   370     const char* tail;
   368     const char* tail;
   375     }
   373     }
   376     if (match_option(option, "-Dsun.java.launcher.is_altjvm=", &tail)) {
   374     if (match_option(option, "-Dsun.java.launcher.is_altjvm=", &tail)) {
   377       if (strcmp(tail, "true") == 0) {
   375       if (strcmp(tail, "true") == 0) {
   378         _sun_java_launcher_is_altjvm = true;
   376         _sun_java_launcher_is_altjvm = true;
   379       }
   377       }
   380       continue;
       
   381     }
       
   382     if (match_option(option, "-Dsun.java.launcher.pid=", &tail)) {
       
   383       _sun_java_launcher_pid = atoi(tail);
       
   384       continue;
   378       continue;
   385     }
   379     }
   386   }
   380   }
   387 }
   381 }
   388 
   382 
  1409   }
  1403   }
  1410 
  1404 
  1411   if (strcmp(key, "java.compiler") == 0) {
  1405   if (strcmp(key, "java.compiler") == 0) {
  1412     process_java_compiler_argument(value);
  1406     process_java_compiler_argument(value);
  1413     // Record value in Arguments, but let it get passed to Java.
  1407     // Record value in Arguments, but let it get passed to Java.
  1414   } else if (strcmp(key, "sun.java.launcher.is_altjvm") == 0 ||
  1408   } else if (strcmp(key, "sun.java.launcher.is_altjvm") == 0) {
  1415              strcmp(key, "sun.java.launcher.pid") == 0) {
  1409     // sun.java.launcher.is_altjvm property is
  1416     // sun.java.launcher.is_altjvm and sun.java.launcher.pid property are
  1410     // private and is processed in process_sun_java_launcher_properties();
  1417     // private and are processed in process_sun_java_launcher_properties();
       
  1418     // the sun.java.launcher property is passed on to the java application
  1411     // the sun.java.launcher property is passed on to the java application
  1419   } else if (strcmp(key, "sun.boot.library.path") == 0) {
  1412   } else if (strcmp(key, "sun.boot.library.path") == 0) {
  1420     // append is true, writable is true, internal is false
  1413     // append is true, writable is true, internal is false
  1421     PropertyList_unique_add(&_system_properties, key, value, AppendProperty,
  1414     PropertyList_unique_add(&_system_properties, key, value, AppendProperty,
  1422                             WriteableProperty, ExternalProperty);
  1415                             WriteableProperty, ExternalProperty);