Nikhil, it is important that you tell us exactly what command you typed in to compile your program. If you did that earlier, it would have been much easier to help you. Because you didn't tell us exactly what you did, we have to guess, and it takes much longer to find out what exactly the problem is.
The topic that Giovanni posted a link to explains that if you have directories with spaces in your classpath, you can get this error. The solution is to enclose the path names that contain spaces in "quotes".