diff --git a/java/install.sh b/java/install.sh index 2ee33ea..cb722a3 100755 --- a/java/install.sh +++ b/java/install.sh @@ -1,10 +1,24 @@ #!/bin/sh -if test ! $(which jenv) +# See available versions: asdf list-all java +export JAVA_VER="openjdk-11.0.1" + +if test ! $(which asdf) then - echo " Installing jenv for you." - brew install jenv > /tmp/jenv-install.log + echo " asdf is required.." + $ZSH/asdf/install.sh fi +# https://github.com/skotchpine/asdf-java +asdf plugin-add java +asdf plugin-update java + echo "Installing java.." -brew cask install java > /tmp/java-install.log +asdf install java $JAVA_VER +asdf global java $JAVA_VER + +echo "Java versions installed:" +asdf list java + +echo "Current Java version in use:" +asdf current java diff --git a/java/jenv.zsh b/java/jenv.zsh deleted file mode 100644 index eb4f275..0000000 --- a/java/jenv.zsh +++ /dev/null @@ -1,6 +0,0 @@ -# jenv (http://www.jenv.be) -if (( $+commands[jenv] )) -then - echo "Loading jenv.." - eval "$(jenv init -)"; -fi \ No newline at end of file