If the JDK is installed, you need to add the path to 'java' and 'javac' to your PATH environment variable. Otherwise, you'll have to add the path manually every time you call 'java' or 'javac' from the command line. For instance,
C:\Java\jdk1.5.0_02\bin\javac Class.java