6819213: revive sun.boot.library.path

Support multiplex and mutable sun.boot.library.path

Reviewed-by: acorn, dcubed, xlu
This commit is contained in:
Paul Hohensee 2009-04-01 16:38:01 -04:00
parent d37d544754
commit 4be7c3c672
9 changed files with 345 additions and 50 deletions

View file

@ -852,16 +852,13 @@ bool Arguments::add_property(const char* prop) {
FreeHeap(value);
}
return true;
}
else if (strcmp(key, "sun.java.command") == 0) {
} else if (strcmp(key, "sun.java.command") == 0) {
_java_command = value;
// don't add this property to the properties exposed to the java application
FreeHeap(key);
return true;
}
else if (strcmp(key, "sun.java.launcher.pid") == 0) {
} else if (strcmp(key, "sun.java.launcher.pid") == 0) {
// launcher.pid property is private and is processed
// in process_sun_java_launcher_properties();
// the sun.java.launcher property is passed on to the java application
@ -870,13 +867,14 @@ bool Arguments::add_property(const char* prop) {
FreeHeap(value);
}
return true;
}
else if (strcmp(key, "java.vendor.url.bug") == 0) {
} else if (strcmp(key, "java.vendor.url.bug") == 0) {
// save it in _java_vendor_url_bug, so JVM fatal error handler can access
// its value without going through the property list or making a Java call.
_java_vendor_url_bug = value;
} else if (strcmp(key, "sun.boot.library.path") == 0) {
PropertyList_unique_add(&_system_properties, key, value, true);
return true;
}
// Create new property and add at the end of the list
PropertyList_unique_add(&_system_properties, key, value);
return true;
@ -895,7 +893,7 @@ void Arguments::set_mode_flags(Mode mode) {
// Ensure Agent_OnLoad has the correct initial values.
// This may not be the final mode; mode may change later in onload phase.
PropertyList_unique_add(&_system_properties, "java.vm.info",
(char*)Abstract_VM_Version::vm_info_string());
(char*)Abstract_VM_Version::vm_info_string(), false);
UseInterpreter = true;
UseCompiler = true;
@ -2767,7 +2765,7 @@ void Arguments::PropertyList_add(SystemProperty** plist, const char* k, char* v)
}
// This add maintains unique property key in the list.
void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, char* v) {
void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, char* v, jboolean append) {
if (plist == NULL)
return;
@ -2775,7 +2773,11 @@ void Arguments::PropertyList_unique_add(SystemProperty** plist, const char* k, c
SystemProperty* prop;
for (prop = *plist; prop != NULL; prop = prop->next()) {
if (strcmp(k, prop->key()) == 0) {
prop->set_value(v);
if (append) {
prop->append_value(v);
} else {
prop->set_value(v);
}
return;
}
}