< prev index next >

src/os/bsd/vm/os_bsd.cpp

Print this page
rev 12906 : 8171508: os::jvm_path -XXaltjvm processing error after 8066474
Reviewed-by:

*** 1761,1779 **** return; } if (Arguments::sun_java_launcher_is_altjvm()) { // Support for the java launcher's '-XXaltjvm=<path>' option. Typical ! // value for buf is "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so" // or "<JAVA_HOME>/jre/lib/<vmtype>/libjvm.dylib". If "/jre/lib/" // appears at the right place in the string, then assume we are // installed in a JDK and we're done. Otherwise, check for a // JAVA_HOME environment variable and construct a path to the JVM // being overridden. const char *p = buf + strlen(buf) - 1; ! for (int count = 0; p > buf && count < 5; ++count) { for (--p; p > buf && *p != '/'; --p) /* empty */ ; } if (strncmp(p, "/jre/lib/", 9) != 0) { --- 1761,1779 ---- return; } if (Arguments::sun_java_launcher_is_altjvm()) { // Support for the java launcher's '-XXaltjvm=<path>' option. Typical ! // value for buf is "<JAVA_HOME>/jre/lib/<vmtype>/libjvm.so" // or "<JAVA_HOME>/jre/lib/<vmtype>/libjvm.dylib". If "/jre/lib/" // appears at the right place in the string, then assume we are // installed in a JDK and we're done. Otherwise, check for a // JAVA_HOME environment variable and construct a path to the JVM // being overridden. const char *p = buf + strlen(buf) - 1; ! for (int count = 0; p > buf && count < 4; ++count) { for (--p; p > buf && *p != '/'; --p) /* empty */ ; } if (strncmp(p, "/jre/lib/", 9) != 0) {
< prev index next >