If your class is in an unnamed package (no package statement), then the classpath needs to contain the directory that contains the class. If that is your circumstance, then your CLASSPATH needs to have an entry for javaPrograms-> C:\MyProjects\javaPrograms
Based on what you had in your other post, C:\ should be in your class path and the package name MyProjects\javaPrograms prepended to the Class name when you go to execute it. [ September 23, 2007: Message edited by: Red Smith ]
Thankx for the suggestion buddy!! I have a package name as the first statement of the class. the problem vanished,when I removed the period from my classpath. earlier,my classpath started with ".;" then from C:\> when i gave the command java -ea MyPackage.javaPrograms.Assertions ,then program ran! earlier,this command was not working as the period (as i learnt from the posts in the forum)makes the classloader search the class in the current directory. Thanks buddy, thanks again!