jenv
Estimated time to read: 1 minute
Initial Setup¶
Install dependencies¶
xcode-select --install
Install Brew¶
bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install jenv¶
Install jenv via Brew¶
brew install jenv
Installing jenv shims¶
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(jenv init -)"' >> ~/.zshrc
Verify jenv install¶
jenv doctor
Enabling Mavern support in jenv¶
jenv enable-plugin maven
jenv enable-plugin export
Install Java¶
openJDK¶
brew install openjdk@18
Link brew install to the System sudo ln -sfn /opt/homebrew/opt/openjdk@18/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-18.jdk
Add to jenv jenv add /Library/Java/JavaVirtualMachines/openjdk-18.jdk/Contents/Home
Temurin¶
Install Temurin location = /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/
Configure jenv¶
List versions¶
jenv versions
Configure global version¶
jenv global oracle64-1.6.0.39
Configure local version (per directory)¶
jenv local oracle64-1.6.0.39
Configure shell instance version¶
jenv shell oracle64-1.6.0.39