* download JDK
* create a folder where you want to save all your work.
* open notepad and write your java code and save it in that folder.
*open command promt..
* change directory to that folder
* set your path e.g C:\mywork> set path=%path%;C:\Program Files\Java\jdk1.5.0_09\bin
here mywork is the folder you have created to save your java files
* after you set path
* type javac <filename>
java filename