Here is how you can switch global and local Java versions. Jenv add /opt/homebrew/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/HomeĪfter that you can list available versions in jenv: Default Version Chose to make a given version the default: sdk default scala 3.2.2 This will ensure that all subsequent shells will start with version 3.2.2 in use. To make this change permanent, use the default command instead. So now we need to add all existing Java installations into jEnv by copying those paths and running the command jenv add It is important to realise that this will switch the candidate version for the current shell only. opt/homebrew/Cellar/openjdk//libexec/openjdk.jdk/Contents/Home There are other links inside of this directory which ultimately lead to the real folder where the installation is located: Now add jEnv to system PATH by updating configuration of macOS shell:Įcho 'export PATH="$HOME/.jenv/bin:$PATH"' > ~/.zshrcīrew will install latest version of Java and add a symlink in /opt/homebrew/opt directory. Install jEnv which will allow us to manage Java versions on global and local levels
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |