Skip to content

Commit

Permalink
[java] 修正编译问题
Browse files Browse the repository at this point in the history
  • Loading branch information
commiter committed Mar 28, 2021
1 parent f45c076 commit 835c681
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build-java.sh
Expand Up @@ -6,9 +6,13 @@
set -e
cd "$(dirname "$0")"

# 目前仅支持JDK8编译,Mac下面若安装多个版本JDK,自动为maven选择1.8版本
# 目前最高支持JDK8编译,Mac下面若安装多个版本JDK,自动为maven选择1.8版本
if [[ $(uname -s) == "Darwin" ]]; then
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
jdk=(/Library/Java/JavaVirtualMachines/jdk1.8*)
if [[ ! -z "$jdk" ]]; then
export JAVA_HOME=${jdk[0]}/Contents/Home
echo Using $JAVA_HOME on Mac
fi
fi

BASE_DIR=$(pwd)
Expand Down

0 comments on commit 835c681

Please sign in to comment.