after writing the code and saving it as .java you'll have to compile it.
here comes the command prompt!
How to Compile It:
Click Start > Run > cmd > Brwose to the folder where the .java file exist > Write javac filename.java
and the source file should be compiled! if an error occurred saying that it can't be found or unknown.. then you'll have to modify your System Path!
How to Do That?
In Windows XP go to Control Panel > System > Advanced tab > Environment variables > In the lower list "System variables" click on Path as shown below:

Click "Edit" and at the end append
;C:\Sun\SDK\jdk\bin
(or the path to the appropriate folder where the latest version of JDK is installed on your computer).
NOTE: Do not put spaces before the appended path string.
Click OK on the path edit box and OK on the Environment Variables box. The new setting will go into effect next time you run Command Prompt.