To start building java programs on any system you need to install “JDK”. JDK stands for “Java Development Kit”. JDK has built in class, methods, defitions etc. Without JDK our program is normal Text file. JDK provide tool to compile and execution.

Where to download JDK :

  1. Search “JDK download” on google, or goto this link.
  2. On this link there are multiple versions of JDK available for multiple platforms.
  3. Choose latest version and accept liecence by clicking on toggle button on top.
  4. And download according to your operating system. (also check if you have 64bit operating system then download 64bit version of JDK, else download 32bit)

How to install JDK ???

for windows :

  1. Download windows executable file of JDK 64bit or 32bit according to your system.
  2. After downloading install it as normal app, it will also install “JRE” (Java Runtime Environment).
  3. When installation finish “Right Click on My Computer icon” and choose “Properties”.
  4. From left options click on “Advance system settings”.
  5. Now click on “Environment Variables” button at bottom.
  6. Now there will be 2 parts “User variables” and “System Variables”.
  7. Under “User variable” click on “New…” button.
  8. Enter variable name “path” and variable value to actual path where jdk is installed. in my system it is like this : “C:\Program Files\Java\jdk1.8.0_91\bin”.
  9. Click “ok” and again “ok” to close opened windows.
  10. Now JDK is successfully install on your windows System.

Install JDK on Linux System :

  • After downloading jdk package “it will be in tar.gz format”
  • now open terminal and type below commands 1 by 1.

  • After installation is complete, set environment variables as follows.

Edit the system path in file /etc/profile: Add the following lines at the end.

Install JDK on MAC OSX:

  • After downloading .dmg file from link above.
  • Install as normal app.
  • when installation finish we need to add java installed location to “Java path”. read here how to add java path.