http://java.sun.com/j2se/1.4.2/install-windows.html
note the 'updating path' section. once you have your paths correct, you can use
javac to compile a .java file.
Code:
javac myfirstjavaprogram.java
that would make a new compiled file called
myfirstjavaprogram.class
any further details on this subject should probably be in a new post in the java forum =)