As with any other app you install, you must tell your operating system where to find it. You can't just expect your operating system to magically traverse every directory on your massive hard disk to find it, can you? It's called your PATH environment variable.
Follow the instructions: http://java.sun.com/developer/onlineTraining/new2java/gettingstartedjava.html
Here is my javarun.bat and my autoexec.
AUTOEXEC.BAT
@ECHO OFF
C:\pROGRA~1\COMMON~1\NETWOR~1VIRUSS~1\40~1\.XX\scan.exe c:\
@IF ERRORLEVEL 1 PAUSE
Path= c:\;c:\windows;c:\windows\command;c:\program files\java\jdk1.5.0\bin\
rem Set Classpath=.; "c:\java working directory"
and JAVARUN.BAT
@echo off
PATH=C:\;C:\Windows\;C:\Windows\Command\;c:\program files\java\jdk1.5.0\bin\
rem SET CLASSPATH="C:\Java Working Directory"
cls
autoexec.bat isn't necessarily run. Aren't you running Windows XP or some other flavor? You need to set your PATH environment variable via right-clicking on "My Computer" - choose Properties/Advanced/Environment Variables.
Another note is that Java may not play well with directory names containing spaces, such as "C:\Program Files\...."
yes..
set path=[location of java compiler]
then when you go to your command line., what i do is type:
Java
..list of crap shows.
then you can type in your file stuff.
You have to give a path to the javac, and also in command tell it to go to that path.
Or, you could just use TextPad like I do, which I find to be a lot simpler.