Upgrading jdk from 16 to 17 #163
-
I have currently installed jdk 16 on my Mac M1 machine, I want to install jdk 17 on my device. So my question is if I install jdk 17 on my Mac, will it replace previously installed jdk 16 or they both will run parallel ? If they run parallel how could I remove jdk 16 and have only jdk 17 ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Your Mac will use the latest installed JVM. That said, you should check to see if you have JAVA_HOME set in your environment and update it accordingly. FWIW, your can use /usr/libexec/java_home to see what the current JVM is. Run it with -help for other options. You can toggle between versions with /usr/libexec/java_home --version , or set JAVA_HOME, e.g. |
Beta Was this translation helpful? Give feedback.
Your Mac will use the latest installed JVM. That said, you should check to see if you have JAVA_HOME set in your environment and update it accordingly. FWIW, your can use /usr/libexec/java_home to see what the current JVM is. Run it with -help for other options. You can toggle between versions with /usr/libexec/java_home --version , or set JAVA_HOME, e.g.
export JAVA_HOME=$(/usr/libexec/java_home --version 16)