Well, most likely the jdk directory isn't in your PATH. You should put it in your PATH (it depends on which OS you use) or cd into the java directory. For ex., in Windows, at the C prompt :
type cd jdk1.3 -> cd bin -> javac your_project_name.
type cd jdk1.3 -> cd bin -> javac your_project_name.