File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java mail api

 
Sree Kumari
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i try to compile an javamail application using tomcat5 the error message is as follows.I have set the classpaths also


Unable to compile class for JSP

An error occurred at line: 9 in the jsp file: /MailExample.jsp

Generated servlet error:
[javac] Compiling 1 source file

C:\jakarta-tomcat-5.0.16\work\Catalina\localhost\examples\org\apache\jsp\MailExample_jsp.java:7: package javax.mail does not exist
import javax.mail.*;etc----

The problem seems to be of the classpath.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The problem seems to be of the classpath

Correct. The JavaMail jar files need to be in the classpath. In the case of a WebApp that is usually in WEB-INF/lib.
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apart from what Paul has mentioned in his post, include the pop3.jar, jmail.jar, mailapi.jar and activation.jar in the classpath.

Rgds,

Seetesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic