Skip to main content

Install Open JDK 10 on Mac

Downloading and Installing Open JDK 10 is easy, and does not need to uninstall the existing version of the JDK.
Here are the steps to install Open JDK 10

1) Download Open JDK 10 from
https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_osx-x64_bin.tar.gz

2) Go to the downloaded file's parent folder, and extract the JDK using $tar -xvf openjdk-10.0.2_osx-x64_bin.tar.gz
   
3) Copy the extracted  JDK to the Mac JDK installations folder
$sudo cp -R  ~/Downloads/jdk-10.0.2.jdk  /Library/Java/JavaVirtualMachines/

4) Update, and export JAVA_HOME, PATH in the ~/.bash_profile (or) ~/.bashrc file.
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home"
PATH="$PATH:${JAVA_HOME}/bin"
export JAVA_HOME  PATH 

5) Source the bash_profile/bashrc file to detect the changes.
$ source ~/.bash_profile

6) Open a new Terminal and verify open JDK installation for javac, and java, the following outputs are expected.
$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment 18.3 (build 10.0.2+13)
OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
javac -version
javac 10.0.2
These outputs indicate the successful installation of Open JDK 10 on the machine.

Comments

Popular posts from this blog

Running Multiple Operating Systems(Windows and Ubuntu Linux) on the same machine

VMWare Player is a freely downloadable VMWare. Download VMWare player software and install it on your windows OS download an image of the Ubuntu Linux Desktop version called Ubuntu from http://www.ubuntu.com/getubuntu/download that in iso image format. Then download VMWare configuration bundle that contains a list of files, extract those file to some folder like C:\OS\. Then edit the file" os.vmx file and give the path of the .iso image in that file in the line like below. ide1:0.fileName = C:\OS\ubuntu-8.10-desktop-i386.iso" Now open the file os.vmx file using the vmware player, that will open the Ubuntu OS. You will get a list of options in that select the option install Ubuntu without changing your current configuration of the system Now that will start the Ubuntu OS in a window inside your windows OS. Now you have a browser and all the applications inside the Ubuntu OS, you can start working on that. Double click on this window/expand it to show in full screen. To switch ...