Use default Java version: echo export "JAVA_HOME=\$(/usr/libexec/java_home)" > ~/.zshrc.Use one of the below commands to set JAVA_HOME as per the required Java version: Once the user is logged or opens a new shell the variable will automatically be set by the script. You can add your code in this file to the JAVA_HOME environment variable. Zsh executes ~/.zshrc script during a new session starts. The macOS Catalina (version 10.15) and the newer macOS versions usee the Zsh as the default shell. Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Home 18.0.1, x86_64: "OpenJDK 18.0.1" /Library/Java/JavaVirtualMachines/temurin-18.jdk/Contents/Homeġ6.0.1, x86_64: "AdoptOpenJDK 16" /Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Homeġ5.0.1, x86_64: "AdoptOpenJDK 15" /Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Homeġ1.0.9.1, x86_64: "AdoptOpenJDK 11" /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Homeġ.8.0_275, x86_64: "AdoptOpenJDK 8" /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |