Skip to content

Commit

Permalink
[java] Switch java installation from jenv -> asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdevalias committed May 8, 2019
1 parent 007aac5 commit ebcf5e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
22 changes: 18 additions & 4 deletions java/install.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 0 additions & 6 deletions java/jenv.zsh

This file was deleted.

0 comments on commit ebcf5e5

Please sign in to comment.