Talk is cheap

Bref

  • Install adoptopenjdk8
1
brew cask install adoptopenjdk
  • Set HEAD version of jdk

Install HEAD version

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#To activate jenv, add the following to your ~/.zshrc:
export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"
###############
source ~/.zshrc
### add jkd8 in
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
# set jdk8 to head
jenv global 1.8
# cheak your jdk env
> java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.232-b09, mixed mode)

EOF

Enjoy

I, simon love this world ❤️