Java Development Kit or JDK is a tool kit used to develop Java applications. Java programming language uses this toolkit to load libraries, class, functions, etc. JDK also provides a compiler for the Java programming language which can compile Java source code into Java byte code or Java binary. JDK also provides the JRE (Java Runtime Environment) which is used to run Java application or Java bytecode.
Oracle is the main contributor to the Java programming language. Java Programming language provides standards for Java programming language and its libraries with JDK (Java Development Kit) and JRE (Java Runtime Environment). There are different JDK providers like OpenJDK etc. But the most popular, Java-compatible, performative JDK is Oracle JDK.
Select JDK Version
JDK gets updates with new versions. There are minor and major versions where Java or JDK 12 is the latest. We can also access previous Java versions. Before downloading and installing we need to select the JDK version we want to use. Different JDK versions may have some incompatibilities between different versions. In this tutorial, we will install the latest JDK version which is
We will see the following screen which provides different download options for the JDK installer. JDK can be installed on Linux, MacOSX, and Windows. For Linux
rpm installation packages are provided. Also,
executable files are provided with the
tar.gz extension. Before downloading we have to
Accept License Agreement or the Oracle so we click to the radio button to accept the license.
We will click the
jdk-12.0.1_windows-x64_bin.exe button which will download the JDK installer named
jdk-12.0.1_windows-x64_bin.exe which is 64-bit.
After the download is complete we can start the installation process of Oracle JDK which is fairly straightforward. We will click on the downloaded installation file
jdk-12.0.1_windows-x64_bin.exe. In order to install a software on Windows it is required to get Administrative privileges so we will provide this Admin privileges by accepting the following question with
This the first screen for the installation of the Oracle JDK on Windows for 64-bit. This screen provides simple information like a version. Of course, we will click to
Next to continue the installation.
In this step, we can select the installation path and folder for JDK but using the default one which is
C:\Program Files\Java\jdk-12.0.1\ is the best way. If we want to change we will click to the
Change button. We will click
This will start the installation and when the installation is complete we will see the following screen which says that the installation is successfully completed.
Print JDK Version via Command Line or PowerShell
We can check the installed version from different ways like the folder name. If we do not change the default installation path the pathname will provide the version information like
C:\Program Files\Java\jdk-12.0.1\bin. Or we can print version by running
java.exe from this path
bin folder like below. We will use
-version option which will print JRE, JDK and JVM version. We can run this command from MS-DOS or PowerShell.
PS> .\java.exe -version