1.1 --- a/src/share/vm/runtime/arguments.cpp Thu Jan 15 13:30:09 2009 -0800 1.2 +++ b/src/share/vm/runtime/arguments.cpp Wed Jan 21 11:14:19 2009 -0500 1.3 @@ -229,6 +229,7 @@ 1.4 1.5 inline void set_base(const char* base); 1.6 inline void add_prefix(const char* prefix); 1.7 + inline void add_suffix_to_prefix(const char* suffix); 1.8 inline void add_suffix(const char* suffix); 1.9 inline void reset_path(const char* base); 1.10 1.11 @@ -290,6 +291,10 @@ 1.12 _items[_scp_prefix] = add_to_path(_items[_scp_prefix], prefix, true); 1.13 } 1.14 1.15 +inline void SysClassPath::add_suffix_to_prefix(const char* suffix) { 1.16 + _items[_scp_prefix] = add_to_path(_items[_scp_prefix], suffix, false); 1.17 +} 1.18 + 1.19 inline void SysClassPath::add_suffix(const char* suffix) { 1.20 _items[_scp_suffix] = add_to_path(_items[_scp_suffix], suffix, false); 1.21 } 1.22 @@ -512,7 +517,6 @@ 1.23 return CommandLineFlags::boolAtPut(name, &value, origin); 1.24 } 1.25 1.26 - 1.27 static bool set_fp_numeric_flag(char* name, char* value, FlagValueOrigin origin) { 1.28 double v; 1.29 if (sscanf(value, "%lf", &v) != 1) { 1.30 @@ -525,7 +529,6 @@ 1.31 return false; 1.32 } 1.33 1.34 - 1.35 static bool set_numeric_flag(char* name, char* value, FlagValueOrigin origin) { 1.36 julong v; 1.37 intx intx_v; 1.38 @@ -555,7 +558,6 @@ 1.39 return false; 1.40 } 1.41 1.42 - 1.43 static bool set_string_flag(char* name, const char* value, FlagValueOrigin origin) { 1.44 if (!CommandLineFlags::ccstrAtPut(name, &value, origin)) return false; 1.45 // Contract: CommandLineFlags always returns a pointer that needs freeing. 1.46 @@ -591,7 +593,6 @@ 1.47 return true; 1.48 } 1.49 1.50 - 1.51 bool Arguments::parse_argument(const char* arg, FlagValueOrigin origin) { 1.52 1.53 // range of acceptable characters spelled out for portability reasons 1.54 @@ -652,7 +653,6 @@ 1.55 return false; 1.56 } 1.57 1.58 - 1.59 void Arguments::add_string(char*** bldarray, int* count, const char* arg) { 1.60 assert(bldarray != NULL, "illegal argument"); 1.61 1.62 @@ -756,7 +756,6 @@ 1.63 return true; 1.64 } 1.65 1.66 - 1.67 bool Arguments::process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized) { 1.68 FILE* stream = fopen(file_name, "rb"); 1.69 if (stream == NULL) { 1.70 @@ -932,7 +931,6 @@ 1.71 } 1.72 } 1.73 1.74 - 1.75 // Conflict: required to use shared spaces (-Xshare:on), but 1.76 // incompatible command line options were chosen. 1.77 1.78 @@ -946,7 +944,6 @@ 1.79 } 1.80 } 1.81 1.82 - 1.83 // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC 1.84 // if it's not explictly set or unset. If the user has chosen 1.85 // UseParNewGC and not explicitly set ParallelGCThreads we 1.86 @@ -1714,6 +1711,21 @@ 1.87 return result; 1.88 } 1.89 1.90 + if (AggressiveOpts) { 1.91 + // Insert alt-rt.jar between user-specified bootclasspath 1.92 + // prefix and the default bootclasspath. os::set_boot_path() 1.93 + // uses meta_index_dir as the default bootclasspath directory. 1.94 + const char* altclasses_jar = "alt-rt.jar"; 1.95 + size_t altclasses_path_len = strlen(get_meta_index_dir()) + 1 + 1.96 + strlen(altclasses_jar); 1.97 + char* altclasses_path = NEW_C_HEAP_ARRAY(char, altclasses_path_len); 1.98 + strcpy(altclasses_path, get_meta_index_dir()); 1.99 + strcat(altclasses_path, altclasses_jar); 1.100 + scp.add_suffix_to_prefix(altclasses_path); 1.101 + scp_assembly_required = true; 1.102 + FREE_C_HEAP_ARRAY(char, altclasses_path); 1.103 + } 1.104 + 1.105 // Parse _JAVA_OPTIONS environment variable (if present) (mimics classic VM) 1.106 result = parse_java_options_environment_variable(&scp, &scp_assembly_required); 1.107 if (result != JNI_OK) { 1.108 @@ -1729,7 +1741,6 @@ 1.109 return JNI_OK; 1.110 } 1.111 1.112 - 1.113 jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, 1.114 SysClassPath* scp_p, 1.115 bool* scp_assembly_required_p, 1.116 @@ -1795,7 +1806,7 @@ 1.117 *scp_assembly_required_p = true; 1.118 // -Xrun 1.119 } else if (match_option(option, "-Xrun", &tail)) { 1.120 - if(tail != NULL) { 1.121 + if (tail != NULL) { 1.122 const char* pos = strchr(tail, ':'); 1.123 size_t len = (pos == NULL) ? strlen(tail) : pos - tail; 1.124 char* name = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len + 1), tail, len); 1.125 @@ -2558,7 +2569,6 @@ 1.126 } 1.127 } 1.128 1.129 - 1.130 // Parse JavaVMInitArgs structure passed in, as well as JAVA_TOOL_OPTIONS and _JAVA_OPTIONS 1.131 jint result = parse_vm_init_args(args); 1.132 if (result != JNI_OK) {