diff options
author | Adrian DC <radian.dc@gmail.com> | 2016-10-06 13:42:43 +0200 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-10-12 06:03:00 -0700 |
commit | 5bf9b09f6420bd494702ce1b7eb8d502e2d33963 (patch) | |
tree | e7f5295b72ea0317ebe13c22f30d2c35b775f3d8 /envsetup.sh | |
parent | 7b16908add24102b5c3aa36b1062075c1c67e088 (diff) | |
download | build-5bf9b09f6420bd494702ce1b7eb8d502e2d33963.zip build-5bf9b09f6420bd494702ce1b7eb8d502e2d33963.tar.gz build-5bf9b09f6420bd494702ce1b7eb8d502e2d33963.tar.bz2 |
build: Support a fallback to java 8 if java 7 is not found
* In the case of a host installed only with java 8,
the build starts correctly but on use of JAVA_HOME
binaries, the java references are missing
* Allow the java 7 to be tested and try to use java 8
Change-Id: Ie50892edb54feb8608a0ef80a1c2a8667703e8ee
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/envsetup.sh b/envsetup.sh index 3efd683..3c11a22 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -2406,7 +2406,8 @@ function set_java_home() { export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 ;; esac - else + fi + if [ ! "$JAVA_HOME" ] || [ ! -d "$JAVA_HOME" ]; then case `uname -s` in Darwin) export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) |