Hey! Tea lovers. Let us talk about the first baby step into the Java world. Yes, the first step is the Installation of
Java Development Kit aka JDK.And it’s the latest one! (13 as of now).
Note It Down
This post discusses the installation of JDK on the Windows system. We will be discussing other operating systems such as Ubuntu and Centos. The JDK I am utilizing for the aforementioned post is OpenJDK 13. We have JDK 14 as well but it’s an early release and might have bugs. So we won’t be using that. But you can apply this tutorial to any version of JDK.
1. Downloading the Latest JDK
Java 13 OpenJDK download page link is here. Select your desired version. We will be selecting 13 windows zip.
2. Installing Latest JDK
Extract the contents in
C:/Program Files/Java/ or in any other folder of your choice.
3. Setting Up Path Variables
Putting the JDK folder inside Java won’t make it run the latest version. We have to tell Windows to point this folder
jdk-13.0.1 whenever we call
javac. So the journey is,
Go to Control Panel > System and Security > System > Advanced System settings
Click on Environment Variables.
You will be getting 2 sections of User variables and System variables.
For Java Home, Click the
New button under
User variables for <your user name> section.
Variable name type
JAVA_HOME and in
Variable value paste the path till JDK folder, In this case,
C:Program FilesJavajdk-13.1.0. Then press OK.
Now click the
Path variable from the
System variables section. Either double click it or click edit.
Click the New button and paste the path of the
bin folder of the JDK (
<path of JAVA_HOME>in). For me, it will be
C:Program FilesJavajdk-13.1.0in and then click
In case of already existing JDK such as JDK8 by Oracle or anyone, replace it with this path.
Now press Ok on all the popup windows to save the changes. And open command line for the next step.
Open the new cmd console. Do not verify on already opened cmd. These changes won’t reflect in it. Type the following commands to verify the changes.
java -version: Returns the version of JDK. It should return 13.1.0.
javac -version: Returns the version of JDK compiler. It again should return 13.1.0.
echo %JAVA_HOME%: Should return JDK path. For me it will be
To Be Continued
And that’s it for this post. We have covered the Windows installation of the latest JDK, 13.1.0. But like I said, the procedure is the same for any other version as long as you set the path variables. We will be having the latest JDK installation guide for the Linux systems such as Ubuntu and Centos. Please share your thoughts on this in the comment section. So make your tea ready by then to sip and learn. See you in another post.