src/hotspot/share/runtime/arguments.cpp
changeset 50557 83e2deb73612
parent 50505 50469fb301c4
child 50589 e5d741569070
equal deleted inserted replaced
50556:e5a40146791b 50557:83e2deb73612
   114 SystemProperty *Arguments::_sun_boot_library_path = NULL;
   114 SystemProperty *Arguments::_sun_boot_library_path = NULL;
   115 SystemProperty *Arguments::_java_library_path = NULL;
   115 SystemProperty *Arguments::_java_library_path = NULL;
   116 SystemProperty *Arguments::_java_home = NULL;
   116 SystemProperty *Arguments::_java_home = NULL;
   117 SystemProperty *Arguments::_java_class_path = NULL;
   117 SystemProperty *Arguments::_java_class_path = NULL;
   118 SystemProperty *Arguments::_jdk_boot_class_path_append = NULL;
   118 SystemProperty *Arguments::_jdk_boot_class_path_append = NULL;
       
   119 SystemProperty *Arguments::_vm_info = NULL;
   119 
   120 
   120 GrowableArray<ModulePatchPath*> *Arguments::_patch_mod_prefix = NULL;
   121 GrowableArray<ModulePatchPath*> *Arguments::_patch_mod_prefix = NULL;
   121 PathString *Arguments::_system_boot_class_path = NULL;
   122 PathString *Arguments::_system_boot_class_path = NULL;
   122 bool Arguments::_has_jimage = false;
   123 bool Arguments::_has_jimage = false;
   123 
   124 
   393 
   394 
   394   PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
   395   PropertyList_add(&_system_properties, new SystemProperty("java.vm.specification.name",
   395                                                            "Java Virtual Machine Specification",  false));
   396                                                            "Java Virtual Machine Specification",  false));
   396   PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(),  false));
   397   PropertyList_add(&_system_properties, new SystemProperty("java.vm.version", VM_Version::vm_release(),  false));
   397   PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(),  false));
   398   PropertyList_add(&_system_properties, new SystemProperty("java.vm.name", VM_Version::vm_name(),  false));
   398   PropertyList_add(&_system_properties, new SystemProperty("java.vm.info", VM_Version::vm_info_string(),  true));
       
   399   PropertyList_add(&_system_properties, new SystemProperty("jdk.debug", VM_Version::jdk_debug_level(),  false));
   399   PropertyList_add(&_system_properties, new SystemProperty("jdk.debug", VM_Version::jdk_debug_level(),  false));
       
   400 
       
   401   // Initialize the vm.info now, but it will need updating after argument parsing.
       
   402   _vm_info = new SystemProperty("java.vm.info", VM_Version::vm_info_string(), true);
   400 
   403 
   401   // Following are JVMTI agent writable properties.
   404   // Following are JVMTI agent writable properties.
   402   // Properties values are set to NULL and they are
   405   // Properties values are set to NULL and they are
   403   // os specific they are initialized in os::init_system_properties_values().
   406   // os specific they are initialized in os::init_system_properties_values().
   404   _sun_boot_library_path = new SystemProperty("sun.boot.library.path", NULL,  true);
   407   _sun_boot_library_path = new SystemProperty("sun.boot.library.path", NULL,  true);
   415   PropertyList_add(&_system_properties, _sun_boot_library_path);
   418   PropertyList_add(&_system_properties, _sun_boot_library_path);
   416   PropertyList_add(&_system_properties, _java_library_path);
   419   PropertyList_add(&_system_properties, _java_library_path);
   417   PropertyList_add(&_system_properties, _java_home);
   420   PropertyList_add(&_system_properties, _java_home);
   418   PropertyList_add(&_system_properties, _java_class_path);
   421   PropertyList_add(&_system_properties, _java_class_path);
   419   PropertyList_add(&_system_properties, _jdk_boot_class_path_append);
   422   PropertyList_add(&_system_properties, _jdk_boot_class_path_append);
       
   423   PropertyList_add(&_system_properties, _vm_info);
   420 
   424 
   421   // Set OS specific system properties values
   425   // Set OS specific system properties values
   422   os::init_system_properties_values();
   426   os::init_system_properties_values();
   423 }
   427 }
   424 
   428 
  4449   }
  4453   }
  4450 
  4454 
  4451   PropertyList_add(plist, k, v, writeable == WriteableProperty, internal == InternalProperty);
  4455   PropertyList_add(plist, k, v, writeable == WriteableProperty, internal == InternalProperty);
  4452 }
  4456 }
  4453 
  4457 
  4454 // Update existing property with new value.
       
  4455 void Arguments::PropertyList_update_value(SystemProperty* plist, const char* k, const char* v) {
       
  4456   SystemProperty* prop;
       
  4457   for (prop = plist; prop != NULL; prop = prop->next()) {
       
  4458     if (strcmp(k, prop->key()) == 0) {
       
  4459         prop->set_value(v);
       
  4460         return;
       
  4461     }
       
  4462   }
       
  4463   assert(false, "invalid property");
       
  4464 }
       
  4465 
       
  4466 // Copies src into buf, replacing "%%" with "%" and "%p" with pid
  4458 // Copies src into buf, replacing "%%" with "%" and "%p" with pid
  4467 // Returns true if all of the source pointed by src has been copied over to
  4459 // Returns true if all of the source pointed by src has been copied over to
  4468 // the destination buffer pointed by buf. Otherwise, returns false.
  4460 // the destination buffer pointed by buf. Otherwise, returns false.
  4469 // Notes:
  4461 // Notes:
  4470 // 1. If the length (buflen) of the destination buffer excluding the
  4462 // 1. If the length (buflen) of the destination buffer excluding the