Hi Jaideep,
I tried running your program in my computer and it worked as expected. So, the issue may be due to improper installation of the Java in your computer.(which can be checked if the javac.exe file is present under the Java folder in your computer) Try re installaing the application.
Secondly, if you are using a 64 bit version of the operating system then the installation path of java would be Program Files (x86) instead of Program Files.
Please inform me about the status so that we can try some other alternatives if it doesn't work.
Regards,
Ranjeet.
May 10, 2012