


For an instruction on how to update Java see the sections below.Īfter the download, open the DMG file and run the PKG installer file that is contained. It is recommended to install the latest version and occasionally update the installed Java version. The file is packaged in Mac’s DMG installation file format. Before the download you have to accept the license agreement. Make sure to download the JDK, not the JRE (runtime environment). The official JDK should be downloaded from the official Oracle Java website. So let us see how to install and update the Java Development Kit (JDK) on macOS on your own. Since macOS 10.7 Lion (2011) it is not pre-installed anymore. In macOS 10.6 Snow Leopard and below Java was pre-installed and shipped with your Mac. If you want to write some Java code on your Mac, you will need the JDK to run your code. The Java Development Kit (JDK) is essential for Java developers and contains the Java runtime environment as well as the Java compiler and other Java libraries. On the Command prompt, type the following command and hit Enter: java -versionĪs soon as you do that, the Command prompt will check your PC for Java.This article explains how to install and update the Java Development Kit (JDK) on macOS, how to check Java version, and how to set the JAVA_HOME variable. To do that, go to the Start menu search bar, type in ‘cmd,’ and select the Best match.

In this article, we’ll go over the exact method to install JDK, or the Java Development Environment, a software development environment necessary for running the Java on your PC.īefore we move to the installation, though, it’s useful to see if JDK is already present in your system. Therefore, it makes sense for anyone interested in programming, and the larger software development world in general, to get their hand dirty with Java. One of the most favored programming language for back-end development (along with JavaScript), Java is also a fairly popular choice for mobile and desktop development as well.
