How to install java and set environment variables and create java project in intellij

JRE (Java Runtime) is required to run Java programs. To write and run Java programs, JDK (Java Development Kit), which includes JRE plus development tools (e.g. compiler and debugger) is needed. In other words, JRE is a subset of JDK. You should install JDK, which includes JRE, as you need both as a developer. 

Below are the steps to install Java 

Step 1: First uninstall the older version of JDK/JRE. Go to control panel and uninstall java. 

We recommend that only the latest JDK be installed. Although it is possible to install multiple versions of JDK / JRE simultaneously.

Step 1: Install Java

Install Java in your system if not installed. To Check Java is already installed in your system or not, Follow below steps

1.      Press Window + R keys 

2.      Type cmd & hit Enter.

3.      In Command prompt: Type “java -version” and Enter.

4.      If the Java is already installed in your system, it returns the java version (as seen below). If not, it shows as invalid command.

windows java commands

How to Download/install Java JDK

1. Go to L-ink. Click on JDK Download for Java JDK download.
2. Download Java JDK version as per your system configurations (32 bit or 64 bit).
3. Once the Java JDK download is complete, run the exe for install JDK. Click Next
4. Place this file here: C:\Program Files\Java 
5. Follow the onscreen instructions in succeeding installation steps.
6. Once you install Java in windows, click Close.
7. Now, as mentioned in step1, check JAVA version in cmd window.