In this post you will learn how to set the default
JAVA_HOME in OS X when you have more than one JDK installed in your computer. First you need to run
/usr/libexec/java_home -V command to get the list of installed JDK. The command will print out something like the following depending on the available JDK in your computer.
On my machine I have the following version of Java.
Download Free Java here. After the download completes, run the installer and follow the steps. After the download completes, click on the downloaded.dmg file. Drag the gephi application in your Application folder. Update your distribution with the last official JRE 7 ir 8 packages. After the download completes, unzip and untar. Java jdk 1 5 free download - Apple Java for OS X 10.5, Apple Mac OS Update 8.6, Apple Mac OS Update 9.0.4, and many more programs. Java Development Kit: How To Install And Setup the JDK For A Mac Running OS X - Duration: 6:35. The Learn Programming Channel 110,910 views. After setting the JAVAHOME and you run the java -version command you will see that JDK 1.8 is the new default JDK in your computer. Java version '1.8.0121' Java(TM) SE Runtime Environment (build 1.8.0121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode).
From the list above pick which version you want to be the default JDK. For example I will choose the
1.8.0_121 version to be my default JDK. To set it run the command below.
If the major version of the available JDK is unique you can just use the major version, like:
After setting the JAVA_HOME and you run the
java -version command you will see that JDK 1.8 is the new default JDK in your computer.
Jdk Download For Mac Os
The change above will only active in the current running shell. If you close or terminate the shell, next time you open the shell you will need to set it again. To make this change permanent you need to set it in your shell init file. For example if you are using
bash then you can set the command in the
.bash_profile. Add the following lines at the end of the file.
To activate this configuration right away your can run
source .bash_profile. This command reads and executes the
.bash_profile in the current shell.
Java Jdk 8 Download Mac Os X 10.10
- How do I convert java.util.TimeZone to java.time.ZoneId? - April 25, 2020
- How do I get a list of all TimeZones Ids using Java 8? - April 25, 2020
- How do I get HTTP headers using HttpClient HEAD request? - April 22, 2020