How to change Java (JVM) version in Mac OS?
Recently, I had an issue to change my default JVM version in my Mac machine. I want to provide steps to change java version
with Mac OS. Use below command to check current default java version:
Download required java version and install it before proceed to further.
Open terminal, and run below command:
cd /System/Library/Frameworks/JavaVM.framework/Versions/
|
Check where your java is installed, in general, you can find your java installation in the below location:
/System/Library/Java/JavaVirtualMachines
/Library/Java/JavaVirtualMachines/
|
Find the right jdk path and create a softlink as shown below: Here I am making Java 7 as default version.
rm CurrentJDK
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/ CurrentJDK
|
|