Download latest version of java

Before getting started with java you must have installed and properly configured java in your local machine. There are two things that you need to understand before downloading java.

  1. JDK (Java Development Kit).
  2. JRE (Java Runtime Environment).

JDK (Java Development Kit)

If you want to develop / test / debug Java applications in the system, you need JDK installed and configured according to your system. The JDK contains all the libraries and other things needed to develop an application in Java.

JRE (Java Runtime Environment)

On the other hand, JRE is only responsible to run/execute java application in your system. By default, JRE is installed and comes with most of the operating system.

Visit the official download page Oracles website.

  1. Accept the Oracle’s License agreement, in order to be able to download the JDK.
  2. Find and click on the version that corresponds to your machine’s architecture, either 32-bit or 64-bit.
  3. In the appearing dialog box, click on Save, in order to download the file to your local system.

Run the installer

Once the installer setup is downloaded simply run it and follow the instructions to install it properly.


Setting up the local environment

It’s time to setup installed Java on our system to make the development process easier. You can execute Java applications normally without setting the PATH environment variable. But in this case, every time you need to specify the complete path to the java executable like – (javac.exe, java.exe, javadoc.exe, etc).

Windows Operating System

On Windows OS default installation directory is C:\Program Files\Java if you haven’t, change it while installation. You have to add C:\Program Files\Java\jdk.x.x\bin (Binary) directory path to windows environment path.

  1. Right-click on the ‘Computer’ icon and select ‘Properties’.
  2. A new window will appear, from left sidebar, panel select ‘Advanced system settings’.
  3. Again new dialog window will be open with the title ‘System Properties’.
  4. Select the ‘Advanced’ tab if not selected, and click on ‘Environment Variables…’
  5. New Windows will appear with the title ‘Environment Variables’.
  6. From the ‘System Variables’ section scroll and select ‘PATH’ and click on Edit button.
  7. Now, add the path of Java executables (C:\Program Files\Java\jdk1.x.x).
  8. Click on the Ok button, and close all the windows.