Setting up Your Development Environment

As with all Java technology you must have the appropriate class files available in your CLASSPATH. As discussed on Day 2, “The J2EE Platform and Roles,” and Day 3, “Naming and Directory Services,” the examples for JavaMail will be run as J2EE RI application clients. All the CLASSPATH problems are handled by asant build files provided with the Day 11 example code on the accompanying Web site.

If you are using JavaMail as an extension to J2SE, you will need to include the mail.jar file (from the JavaMail installation directory) and the activation.jar file (from the JAF installation directory) in your CLASSPATH or install these JAR files as standard Java extensions.

Now you are almost ready to write a JavaMail ...

Get Sams Teach Yourself J2EE™ in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.