-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Actual
I have JAVA_HOME environment variable set to the path of a valid JDK, but locate-java-home does not find it.
Expected
The value of JAVA_HOME should always be considered a reasonable candidate when checking for a valid java-home.
Root cause
Turns out on MacOS only the output of /usr/libexec/java_home is used and that one ignores whatever is in JAVA_HOME.
Fix
Add this snippet from linux.ts to darwin.ts line 22:
// Option 2: Is JAVA_HOME defined?
// (NOTE: locate_java_home will prune redundancies.)
if (process.env.JAVA_HOME) {
installations.push(process.env.JAVA_HOME!);
}
ckipp01, ArquintL, grzegorz-bielski and hedefalk
Metadata
Metadata
Assignees
Labels
No labels