Install Java

Downloading Java

Java is available in two variants, a JRE and JDK. JRE is used for running Java applications, however you need JDK for development.

As part of this tutorial series we are going develop Java programs, so we need to install JDK. You can download JDK from Oracle Download Page.

You need to download the correct package suitable to your machine.

You also need to download the package based on type of the processor x64 or x86.

On Windows 10, to check if your machine is a 32 bit or 64 bit, go to Settings > System > About. In this screen, you can find whether it’s a 32-bit or 64-bit processor.

Installing Java on Windows computer:

  • Double click the downloaded file to install
  • Proceed with all default options to complete the installation
  • Once the installation is completed, ensure that environment variables JAVA_HOME and PATH are configured
  • Set the environment variable JAVA_HOME to your installation directory, Ex: C:\Program Files\Java\jdk1.8.0_151
  • Set the environment variable PATH to the bin directory of your Java installation, Ex: C:\Program Files\Java\jdk1.8.0_151\bin
  • Open Command Prompt/Bash and type java -v
  • This should print installed version of Java
  • If it returns unknown command, that means PATH variable is not configured correctly