comparison src/os/windows/vm/os_windows.cpp @ 1985:cb2d0a362639

6981484: Update development launcher Summary: Add new development launcher called hotspot(.exe) Reviewed-by: coleenp
author sla
date Thu, 02 Dec 2010 05:45:54 -0800
parents 828eafbd85cc
children 54f5dd2aa1d9
comparison
equal deleted inserted replaced
1984:2968675b413e 1985:cb2d0a362639
1706 if (saved_jvm_path[0] != 0) { 1706 if (saved_jvm_path[0] != 0) {
1707 strcpy(buf, saved_jvm_path); 1707 strcpy(buf, saved_jvm_path);
1708 return; 1708 return;
1709 } 1709 }
1710 1710
1711 buf[0] = '\0';
1712 if (strcmp(Arguments::sun_java_launcher(), "gamma") == 0) {
1713 // Support for the gamma launcher. Check for an
1714 // ALT_JAVA_HOME or JAVA_HOME environment variable
1715 // and fix up the path so it looks like
1716 // libjvm.so is installed there (append a fake suffix
1717 // hotspot/libjvm.so).
1718 char* java_home_var = ::getenv("ALT_JAVA_HOME");
1719 if (java_home_var == NULL) {
1720 java_home_var = ::getenv("JAVA_HOME");
1721 }
1722 if (java_home_var != NULL && java_home_var[0] != 0) {
1723
1724 strncpy(buf, java_home_var, buflen);
1725
1726 // determine if this is a legacy image or modules image
1727 // modules image doesn't have "jre" subdirectory
1728 size_t len = strlen(buf);
1729 char* jrebin_p = buf + len;
1730 jio_snprintf(jrebin_p, buflen-len, "\\jre\\bin\\");
1731 if (0 != _access(buf, 0)) {
1732 jio_snprintf(jrebin_p, buflen-len, "\\bin\\");
1733 }
1734 len = strlen(buf);
1735 jio_snprintf(buf + len, buflen-len, "hotspot\\jvm.dll");
1736 }
1737 }
1738
1739 if(buf[0] == '\0') {
1711 GetModuleFileName(vm_lib_handle, buf, buflen); 1740 GetModuleFileName(vm_lib_handle, buf, buflen);
1741 }
1712 strcpy(saved_jvm_path, buf); 1742 strcpy(saved_jvm_path, buf);
1713 } 1743 }
1714 1744
1715 1745
1716 void os::print_jni_name_prefix_on(outputStream* st, int args_size) { 1746 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {