mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 1528314 - Make configure find an appropriate java via /usr/libexec/java_home on macOS. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D36561 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e1e0add912
commit
5762785f58
@ -24,6 +24,10 @@ def java_search_paths(host, path):
|
||||
if host.os == 'WINNT':
|
||||
for x in get_registry_values(r'HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.8\JavaHome', get_32_and_64_bit=True):
|
||||
return [os.path.join(x[0], 'bin')]
|
||||
if host.os == 'OSX':
|
||||
home = check_cmd_output('/usr/libexec/java_home', '-v', '1.8', onerror=lambda: '').rstrip()
|
||||
if home:
|
||||
return [os.path.join(home, 'bin')]
|
||||
return [environ.get('PATH')]
|
||||
|
||||
# Finds the given java tool, failing with a custom error message if we can't
|
||||
|
Loading…
Reference in New Issue
Block a user