mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8027113: decouple the '-XXaltjvm=<path>' option from the gamma launcher
Decoupled the '-XXaltjvm=<path>' option from the gamma launcher. Clearing the way for removing the remaining cruft associated with the previously removed gamma launcher. Reviewed-by: dcubed, dholmes
This commit is contained in:
parent
455663f56e
commit
97d55c801e
9 changed files with 105 additions and 77 deletions
|
@ -2371,13 +2371,14 @@ void os::jvm_path(char *buf, jint buflen) {
|
|||
if (rp == NULL)
|
||||
return;
|
||||
|
||||
if (Arguments::created_by_gamma_launcher()) {
|
||||
// Support for the gamma launcher. Typical value for buf is
|
||||
// "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so". 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 fix
|
||||
// up the path so it looks like libjvm.so is installed there (append a
|
||||
// fake suffix hotspot/libjvm.so).
|
||||
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".
|
||||
// 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 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue