equal
deleted
inserted
replaced
1786 rp = realpath(dli_fname, buf); |
1786 rp = realpath(dli_fname, buf); |
1787 } |
1787 } |
1788 if (rp == NULL) |
1788 if (rp == NULL) |
1789 return; |
1789 return; |
1790 |
1790 |
1791 if (Arguments::created_by_gamma_launcher()) { |
1791 if (Arguments::sun_java_launcher_is_altjvm()) { |
1792 // Support for the gamma launcher. Typical value for buf is |
1792 // Support for the java launcher's '-XXaltjvm=<path>' option. Typical |
1793 // "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm". If "/jre/lib/" appears at |
1793 // value for buf is "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so" |
1794 // the right place in the string, then assume we are installed in a JDK and |
1794 // or "<JAVA_HOME>/jre/lib/<vmtype>/libjvm.dylib". If "/jre/lib/" |
1795 // we're done. Otherwise, check for a JAVA_HOME environment variable and |
1795 // appears at the right place in the string, then assume we are |
1796 // construct a path to the JVM being overridden. |
1796 // installed in a JDK and we're done. Otherwise, check for a |
|
1797 // JAVA_HOME environment variable and construct a path to the JVM |
|
1798 // being overridden. |
1797 |
1799 |
1798 const char *p = buf + strlen(buf) - 1; |
1800 const char *p = buf + strlen(buf) - 1; |
1799 for (int count = 0; p > buf && count < 5; ++count) { |
1801 for (int count = 0; p > buf && count < 5; ++count) { |
1800 for (--p; p > buf && *p != '/'; --p) |
1802 for (--p; p > buf && *p != '/'; --p) |
1801 /* empty */ ; |
1803 /* empty */ ; |