Install Java on Windows

Java is one of the most favorite programming language used by millions of applications and programs today. Java run on various platforms like windows, unix and mac os. It is very essential to understand how to install Java.

In this tutorial, I will be showing how to install Java in Windows machine. The very first step is to download it form official web site.

Download

  • First of all, download latest version of Java from official oracle site link.
  • Apparently, you need to choose the OS type and architecture (32 or 64 bit). If you are using windows 64 bit, then download JDK for Windows x64.
  • Note : this single setup contains both JDK and JRE (Java Runtime Environment) so it is not required to download JRE 8 explicitely. JDK download and installation is suffice.
  • Choosing default location for installation, and you will get following folder under C:\Windows\Program Files\Java.

Java installation - Liferay 7 installation

Set Java Home (Install Java)

Once Java is installed, you need to add new environment variable called JAVA_HOME and have to update PATH variable with Java home. Below are the steps.

  • Open explorer, right click on This PC and click on Properties. You will see below screenshot.

Set environment variable -Install Java

  • Click on Advanced system settings link from left-end side. You will see below screen.

Set environment variable - Install Java

  • Click on Environment Variables.. button and you will see windows like below screenshot.

Set environment variable - Install Java

  • The upper section defines the variables available to current window user only. The lower section shows the variables available to all users.
  • Click on New.. button from lower section and add entries like below screenshot.

Set environment variable - Install Java

  • Give variable name as JAVA_HOME and its value as the path of your JDK folder (you have two folder under C:\Program File\Java, you need to choose the JDK folde).
  • Note : I have 1.8.0_60 but you may have updated minor version.

Update Path environment variable

Next is to update Path environment variable. Below are the steps.

  • Select Path from the lower section and click on Edit button. You will see new windows.

Set environment variable - Install Java

  • Click on New button and you will see new blank entry. Just add %JAVA_HOME%\bin there. Click on OK button.
  • Again click on OK button.
  • Open command prompt and type java -version. If you see the output like below screenshot, it means Java 8 is installed and configured properly.

Verify if Java 8 is installed - Install Java

  • Note: You may have updated minor version.

Congratulation ….!!! Java is installed successfully on your machine. You can start using it.

Share This Post

Post Comment