Change the Java version in macOS

Achintha Isuru
2 min readJul 21, 2022
Photo by Thoa Ngo on Unsplash

Changing the Java version on your device is essential for almost all developers nowadays as there are multiple Long Term Support(LTS) java versions available. In this tutorial, we will see an one way on how to change the java version in macOS 🍎☕.

1️⃣ Step

Go to the Users and right-click on the <PROFILE_NAME> folder, and open a terminal window from here.

2️⃣ Step

Type

/usr/libexec/java_home -V

and check the available java versions.

Also by typing,

java -version

you can check your current java version.

Now we are at an intersection.

First, we will look at how we are going to change the java version permanently and then we will see how we are going to change the java version temporarily.

Permanently change the java version 🍎

ℹ️ Step

--

--