diff --git a/bin/install-java.sh b/bin/install-java.sh new file mode 100755 index 0000000..99bb741 --- /dev/null +++ b/bin/install-java.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -ex +export ADOPTOPENJDK=${JAVA_VERSION:-8} +curl -sL https://get.sdkman.io | bash +echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config +source "$HOME/.sdkman/bin/sdkman-init.sh" +sdk install java $(sdk list java | grep -o "$ADOPTOPENJDK\.[0-9\.]*hs-adpt" | head -1) +unset JAVA_HOME +java -Xmx32m -version +git fetch --tags