Hi I compiled and ran your code and it runs fine.It seems java is not finding .class file in current directory or classpath . Please check the location of your .class file and the directory from where you are running your program. If you are running on UNIX then may be due to the "$" sign in file name it is giving problem. Check on java on UNIX documentation how to specify the file name if it contains "$" . I guess you will have to put the filename in quotes or use some escape characters. I am running this program on windows.