I would assume that the java sdk is instaled in c:\j2sdk1.4.0\ on your
system. First off, you need to set your path to point to
c:\j2sdk1.4.0\bin\ (or whereever the java.exe and javac.exe is).
Next when your in an msdos screen, you can compile a program with
'javac programname.java' and then execute it with 'java programname'
That's pretty much all you should need.