Not usually.
Usually you create a subdirectory to hold
the various program files for a new project.
You would like to run the compiler while working
in that directory.
The Windows operating system uses an
environment variable called
PATH
that is a list of all the
subdirectories in which it is to look to find programs.
In a DOS window, type "path" after the prompt:
C:\j2sdk1.4.2\bin>path PATH=C:\WINNT\system32;C:\WINNT;.;C:\j2sdk1.4.2\bin
Exactly what you see depends on your OS and what you have done
with it.
If you don't see C:\j2sdk1.4.2\bin
If you can't figure out how to set the PATH variable,
then you can put all your programs in
C:\j2sdk1.4.2\bin
and compile and run them there.
This is crude, but it works.