You got this error because you may don't add path C:\j2sdk1.4.2_04\bin (I am
using J2SDK 1.4 example here but you please check your directory list first)
in your Windows Xp Environment Variables. Or you may compiling your Java
file from other folder than it is saved in or may be your java file name is
wrong?
Do one of this:
(1) Check you are compiling Java file from same folder where
it is saved, for Ex: if you have saved your file in C:\Pradyut\Java then go
to C:\Pradyut\Java and they try to compile it by typing this in consol
window (Dos Prompt) javac hello.java. then java hello. (One good advice
while creating any class & class file please make each words first letter in
capital letter, For Ex: HelloJava.java, HelloWorkd.java end etc.).
(2) If you are using Windows other than NT technologies and
using Java2 J2SE1.4 (installed at "C:\j2sdk1.4.2_04\bin") then please add
this path "path=C:\j2sdk1.4.2_04\bin" to your autoexec.bat file. You can do
this by typing "edit autoexec.bat" on C:\ on MS Dos prompt. Or if you are
using Windows with NT technologies like windows 2000, NT or Xp then follow
these steps: -right click on My Computer on your desktop-click on
properties-then click on Advanced tab-click on Environment Variables
button-then find path in System Variables-select path-click on edit
button-then add ;C:\j2sdk1.4.2_04\bin at the end of line-then click OK,
Apply-OK.