This tutorial is to Install OpenJDK (not Oracle JDK)
Download from:
Or Using Azul
e.g download Java 11 for Mac Silicon Chip
Default Path on JDK is:
/Library/Java/JavaVirtualMachines/
ls -lsa /Library/Java/JavaVirtualMachines/
After download tar file or zip file, extra it to the Default JDK Path. e.g
sudo tar xvzf ~/Downloads/zulu8.66.0.15-ca-jdk8.0.352-macosx_aarch64 -C /Library/Java/JavaVirtualMachines
update $PATH and $JAVA_HOME
echo 'export PATH="/Library/Java/JavaVirtualMachines/zulu8.66.0.15-ca-jdk8.0.352-macosx_aarch64/Contents/Home/bin:$PATH"' >> ~/.profile
echo 'export JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu8.66.0.15-ca-jdk8.0.352-macosx_aarch64/Contents/Home"' >> ~/.profile
OR
echo 'export PATH="/Library/Java/JavaVirtualMachines/zulu8.66.0.15-ca-jdk8.0.352-macosx_aarch64/Contents/Home/bin:$PATH"' >> ~/.bashrc
echo 'export JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu8.66.0.15-ca-jdk8.0.352-macosx_aarch64/Contents/Home"' >> ~/.bashrc
source ~/.profile
source ~/.bashrc
check install
java -version
if you want latest update and find more tips and tricks to build your own business platform, please checkout more articles on https://www.productdeploy.com and https://blog.productdeploy.com