hotspot/src/os/windows/vm/os_windows.cpp
changeset 15096 3db45569f8c0
parent 14633 58caa6fc3b7c
child 15098 3ed1d0332785
equal deleted inserted replaced
14820:386ff820786c 15096:3db45569f8c0
   180       char *bin = "\\bin";
   180       char *bin = "\\bin";
   181       char home_dir[MAX_PATH];
   181       char home_dir[MAX_PATH];
   182 
   182 
   183       if (!getenv("_ALT_JAVA_HOME_DIR", home_dir, MAX_PATH)) {
   183       if (!getenv("_ALT_JAVA_HOME_DIR", home_dir, MAX_PATH)) {
   184           os::jvm_path(home_dir, sizeof(home_dir));
   184           os::jvm_path(home_dir, sizeof(home_dir));
   185           // Found the full path to jvm[_g].dll.
   185           // Found the full path to jvm.dll.
   186           // Now cut the path to <java_home>/jre if we can.
   186           // Now cut the path to <java_home>/jre if we can.
   187           *(strrchr(home_dir, '\\')) = '\0';  /* get rid of \jvm.dll */
   187           *(strrchr(home_dir, '\\')) = '\0';  /* get rid of \jvm.dll */
   188           pslash = strrchr(home_dir, '\\');
   188           pslash = strrchr(home_dir, '\\');
   189           if (pslash != NULL) {
   189           if (pslash != NULL) {
   190               *pslash = '\0';                 /* get rid of \{client|server} */
   190               *pslash = '\0';                 /* get rid of \{client|server} */
  1713   // do nothing
  1713   // do nothing
  1714 }
  1714 }
  1715 
  1715 
  1716 static char saved_jvm_path[MAX_PATH] = {0};
  1716 static char saved_jvm_path[MAX_PATH] = {0};
  1717 
  1717 
  1718 // Find the full path to the current module, jvm.dll or jvm_g.dll
  1718 // Find the full path to the current module, jvm.dll
  1719 void os::jvm_path(char *buf, jint buflen) {
  1719 void os::jvm_path(char *buf, jint buflen) {
  1720   // Error checking.
  1720   // Error checking.
  1721   if (buflen < MAX_PATH) {
  1721   if (buflen < MAX_PATH) {
  1722     assert(false, "must use a large-enough buffer");
  1722     assert(false, "must use a large-enough buffer");
  1723     buf[0] = '\0';
  1723     buf[0] = '\0';