1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| brew install jenv
echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(jenv init -)"' >> ~/.zshrc
jenv versions
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home jenv add /Library/Java/JavaVirtualMachines/jdk-11.0.15.1.jdk/Contents/Home jenv add /Library/Java/JavaVirtualMachines/jdk-17.0.3.1.jdk/Contents/Home
jenv remove *
jenv local 1.8 java -version
ll $/.jenv/versions
jenv which java
jenv global 1.8
echo 1.8 >> ./.java-version
|