< prev index next >

src/os/windows/vm/os_windows.cpp

Print this page

        

*** 151,165 **** return result; } // Implementation of os - bool os::getenv(const char* name, char* buffer, int len) { - int result = GetEnvironmentVariable(name, buffer, len); - return result > 0 && result < len; - } - bool os::unsetenv(const char* name) { assert(name != NULL, "Null pointer"); return (SetEnvironmentVariable(name, NULL) == TRUE); } --- 151,160 ----
*** 186,198 **** { char *home_path; char *dll_path; char *pslash; char *bin = "\\bin"; ! char home_dir[MAX_PATH]; ! if (!getenv("_ALT_JAVA_HOME_DIR", home_dir, MAX_PATH)) { os::jvm_path(home_dir, sizeof(home_dir)); // Found the full path to jvm.dll. // Now cut the path to <java_home>/jre if we can. *(strrchr(home_dir, '\\')) = '\0'; // get rid of \jvm.dll pslash = strrchr(home_dir, '\\'); --- 181,197 ---- { char *home_path; char *dll_path; char *pslash; char *bin = "\\bin"; ! char home_dir[MAX_PATH + 1]; ! char *alt_home_dir = ::getenv("_ALT_JAVA_HOME_DIR"); ! if (alt_home_dir != NULL) { ! strncpy(home_dir, alt_home_dir, MAX_PATH + 1); ! home_dir[MAX_PATH] = '\0'; ! } else { os::jvm_path(home_dir, sizeof(home_dir)); // Found the full path to jvm.dll. // Now cut the path to <java_home>/jre if we can. *(strrchr(home_dir, '\\')) = '\0'; // get rid of \jvm.dll pslash = strrchr(home_dir, '\\');
*** 5928,5933 **** // restore globals UseLargePagesIndividualAllocation = old_use_large_pages_individual_allocation; UseNUMAInterleaving = old_use_numa_interleaving; } #endif // PRODUCT - --- 5927,5931 ----
< prev index next >