Java Installation - Java
Java Development Kit (JDK) or officially named "Java Platform Standard Edition (Java SE)". It is free to use, lets follow the Java installation Steps. JRE (Java Runtime Environment) is required to run Java programs but in this java tutorial you are expected to write java programs. So you need to install JDK (It contains development tool + JRE).
Step 1: Download JDK (Java Development Kit)
Java is free and available latest version at official website on Java Oracle Download
Step 2: Install Java
You need execute downloaded java installer something like "jdk-8u{xx}-windows-x64.exe" file. It installs both JDK and JRE.
JDK(Java Development Kit) contains JRE (Java Runtime Environment)
Installation path for JDK
Java installation process needs many steps to install Java properly. Figure 1 shows installation path for JDK. It is used for developing java applications.
Java Development Kit (JDK) Installation Path
Installation path for JRE
JRE installation also needs physical path location in your system drive. you may change your desired installation path. It is used to run Java applications.
Java Runtime Environment(JRE) Installation Path
Step 3: Environment Setup
- Go to Desktop and right click on "MY COMPUTER" -> click properties.
- You have a window with "Control Panel Hone" -> click on Advance System Settings.
- Having clicked on Advance System Settings, you will have following screen -> click on Environment Variables.
Environment Variables Setup
In advance tab there are many buttons like Settings and Environment Variables. So you need to click environment variable button.
Environment Variables
Path Variable Setup
There are two types of environment variables "User Variables and System Variables" you may set PATH variable in both of them. These variables define their level of scope. The User variables are used for particular user level scope. System Variables are used for Global level declaration.
Path Variable
Copy Java Location
As you have seen JDK installation path. Copy the Java path with bin directory.
Java Bin Installed Location
Java Path Variable Setup
While editing user variable there are two input fields. In variable name may have PATH and variable value may have JDK installation path.
Java Path Variable
Add Java Home variable
For JAVA_HOME you may add new System Variable. The variable name should be "JAVA_HOME" and variable value should be "C:\Program Files\Java".
Java Home Environment Variable
Verify Successful Installation
Having finished installation of JDK and JRE with environment variables. This is final step to verify your installation you need you check in command line. In command line window, the output shows Java Version that means you have installed successfully.
Check Java Installed Version