For creating a java program we need a environment to run it, for that JDK (J2SE Development Kit) is evolved.
It have several versions like from JDK1.0 to JDK 6.0, now-a-days JDK7.0 is available in the market.
The following steps will give you the idea of how to install a JDK6.0 in your windows environment.
Step 1:
Double click on the JDK6.0 exe file.
Than accept it ànd next
Step 2:
After accept and clicking next the following dialog box will show on your window.
This dialog box is very important to install.

 jdk installation step one

Step 3:

After getting the above window you have to change some unnecessary things which we won’t need at our development time

 jdk installation step two

By clicking the dropdown menu of public JRE(J2SE runtime environment) we  can disable it by clicking “don’t install this feature now”.
Public JRE is mainly used for production purpose so we need not to install it for development.
There is a private JRE available by default inside JDK.