Java Set-up
Warning
This is a draft.
How to set up Java in macOS with multiple Java versions
Created: 11.10.2023 Last Updated: 11.10.2023
Installation
Install Java Versions
- Install necesarry versions
- Create symlink (this command is also given by HomeBrew)
sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk
Update bash/zsh Profile
- My default java version is 21 but with j17 command it switches to Java version 17.