comparison src/share/vm/runtime/arguments.cpp @ 691:956304450e80

6819213: revive sun.boot.library.path Summary: Support multiplex and mutable sun.boot.library.path Reviewed-by: acorn, dcubed, xlu
author phh
date Wed, 01 Apr 2009 16:38:01 -0400
parents bd441136a5ce
children 2c1dbb844832
comparison
equal deleted inserted replaced
690:d142f1feeed5 691:956304450e80
850 FreeHeap(key); 850 FreeHeap(key);
851 if (eq != NULL) { 851 if (eq != NULL) {
852 FreeHeap(value); 852 FreeHeap(value);
853 } 853 }
854 return true; 854 return true;
855 } 855 } else if (strcmp(key, "sun.java.command") == 0) {
856 else if (strcmp(key, "sun.java.command") == 0) {
857
858 _java_command = value; 856 _java_command = value;
859 857
860 // don't add this property to the properties exposed to the java application 858 // don't add this property to the properties exposed to the java application
861 FreeHeap(key); 859 FreeHeap(key);
862 return true; 860 return true;
863 } 861 } else if (strcmp(key, "sun.java.launcher.pid") == 0) {
864 else if (strcmp(key, "sun.java.launcher.pid") == 0) {
865 // launcher.pid property is private and is processed 862 // launcher.pid property is private and is processed
866 // in process_sun_java_launcher_properties(); 863 // in process_sun_java_launcher_properties();
867 // the sun.java.launcher property is passed on to the java application 864 // the sun.java.launcher property is passed on to the java application
868 FreeHeap(key); 865 FreeHeap(key);
869 if (eq != NULL) { 866 if (eq != NULL) {
870 FreeHeap(value); 867 FreeHeap(value);
871 } 868 }
872 return true; 869 return true;
873 } 870 } else if (strcmp(key, "java.vendor.url.bug") == 0) {
874 else if (strcmp(key, "java.vendor.url.bug") == 0) {
875 // save it in _java_vendor_url_bug, so JVM fatal error handler can access 871 // save it in _java_vendor_url_bug, so JVM fatal error handler can access
876 // its value without going through the property list or making a Java call. 872 // its value without going through the property list or making a Java call.
877 _java_vendor_url_bug = value; 873 _java_vendor_url_bug = value;
878 } 874 } else if (strcmp(key, "sun.boot.library.path") == 0) {
879 875 PropertyList_unique_add(&_system_properties, key, value, true);
876 return true;
877 }
880 // Create new property and add at the end of the list 878 // Create new property and add at the end of the list
881 PropertyList_unique_add(&_system_properties, key, value); 879 PropertyList_unique_add(&_system_properties, key, value);
882 return true; 880 return true;
883 } 881 }
884 882
893 _mode = mode; 891 _mode = mode;
894 892
895 // Ensure Agent_OnLoad has the correct initial values. 893 // Ensure Agent_OnLoad has the correct initial values.
896 // This may not be the final mode; mode may change later in onload phase. 894 // This may not be the final mode; mode may change later in onload phase.
897 PropertyList_unique_add(&_system_properties, "java.vm.info", 895 PropertyList_unique_add(&_system_properties, "java.vm.info",
898 (char*)Abstract_VM_Version::vm_info_string()); 896 (char*)Abstract_VM_Version::vm_info_string(), false);
899 897
900 UseInterpreter = true; 898 UseInterpreter = true;
901 UseCompiler = true; 899 UseCompiler = true;
902 UseLoopCounter = true; 900 UseLoopCounter = true;
903 901
2765 SystemProperty* new_p = new SystemProperty(k, v, true); 2763 SystemProperty* new_p = new SystemProperty(k, v, true);
2766 PropertyList_add(plist, new_p); 2764 PropertyList_add(plist, new_p);
2767 } 2765 }
2768 2766
2769 // This add maintains unique property key in the list. 2767 // This add maintains unique property key in the list.
2770 void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, char* v) { 2768 void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, char* v, jboolean append) {
2771 if (plist == NULL) 2769 if (plist == NULL)
2772 return; 2770 return;
2773 2771
2774 // If property key exist then update with new value. 2772 // If property key exist then update with new value.
2775 SystemProperty* prop; 2773 SystemProperty* prop;
2776 for (prop = *plist; prop != NULL; prop = prop->next()) { 2774 for (prop = *plist; prop != NULL; prop = prop->next()) {
2777 if (strcmp(k, prop->key()) == 0) { 2775 if (strcmp(k, prop->key()) == 0) {
2778 prop->set_value(v); 2776 if (append) {
2777 prop->append_value(v);
2778 } else {
2779 prop->set_value(v);
2780 }
2779 return; 2781 return;
2780 } 2782 }
2781 } 2783 }
2782 2784
2783 PropertyList_add(plist, k, v); 2785 PropertyList_add(plist, k, v);