First of all if you have already java then uninstall that java and download Java Sdk from Sun Microsystem :
For download: jdk (Java Development Kit)
Then choose your appropriate Operation System and download and Install the *.EXE program
This is one of the tough point for beginner to install java Beginner.
Some of the steps to maintain Path of Java compiler are given as follows:
STEP 1: Right click on My Computer and Go properties.
STEP 2: Dialogue Box Appears (given in fig 1.1) Go to Advance Tab > Environment Variables..
STEP 3: Now in New Dialogue box (given in fig.1.2 ) You can click on New Tab for creating new variableRead More »Java Software Development Kit Installation (Windows)