I'm trying to read a mail from Tomcat 6.0. Whenever I put the byte code and source code of the class MailReader in the same folder(and putting the main method), I can compile and run the class and read mail from command prompt, but when I put that class in the folder WEB-INF/classes of tomcat(by removing main method), I'm getting big fat exception saying:
could not find the main class class: Message Reader. Program will exist
Why is that so? I've already put the jar file activation.jar and mail.jar in lib folder of Tomcat, and I'm trying to run the above class from batch file.