Sandip: With that page, you will download the JRE only, not the JDK. If you want to be able to compile your own Java source code, you need the JDK, not just the JRE.
If you click on
http://java.sun.com/javase/downloads/widget/jdk6.jsp do you not get the page with the red "Download" button (see attachment)?
And when you click that button, do you not get the second page with the popup window? On that window, you can click the "Skip this step" link, you don't need to register or login to download the JDK.