< prev index next >
src/os/linux/vm/os_linux.cpp
Print this page
rev 12906 : 8171508: os::jvm_path -XXaltjvm processing error after 8066474
Reviewed-by:
*** 2338,2348 ****
// assume we are installed in a JDK and we're done. Otherwise, check
// for a JAVA_HOME environment variable and fix up the path so it
// looks like libjvm.so is installed there (append a fake suffix
// hotspot/libjvm.so).
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) {
--- 2338,2348 ----
// assume we are installed in a JDK and we're done. Otherwise, check
// for a JAVA_HOME environment variable and fix up the path so it
// looks like libjvm.so is installed there (append a fake suffix
// hotspot/libjvm.so).
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 >