Time for action downloading the JavaMail API

All you need to do is download a ZIP file from the Sun website, unzip it, and copy the mail.jar file to the lib folder in Tomcat, from where Roller can use it along with all the other common library files needed.

  1. Open your web browser and type http://java.sun.com/products/ javamail/downloads/index.html. Scroll down through the page until you find the Download JavaMail 1.4.2 link:
    Time for action downloading the JavaMail APIrequired files, Roller installation on WindowsJavaMail API
  2. Click on the Download button to go to the download page. Select the I agree to the JavaMail 1.4.2 License Agreement box and click on the Continue button:
    Time for action downloading the JavaMail APIrequired files, Roller installation on WindowsJavaMail API
  3. On the next download page, click the javamail-1.4.2.zip link to open the Opening javamail-1.4.2.zip dialog. Select the Save File radio button and click on the OK button to start the download process.
  4. Once the download completes, go to the directory where you downloaded the javamail-1.4.2.zip file.
  5. Unzip the javamail-1.4.2.zip file and locate the mail.jar file inside the javamail-1.4.2 folder. Right-click on the mail.jar file and select Copy from the pop-up menu:
    Time for action downloading the JavaMail APIrequired files, Roller installation on WindowsJavaMail API
  6. Now open Windows Explorer and navigate to Tomcat's lib folder (C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib). Right-click inside the folder and select Paste from the pop-up menu:
    Time for action downloading the JavaMail APIrequired files, Roller installation on WindowsJavaMail API
  7. You can close Windows Explorer and your web browser now.

What just happened?

All right! You've just added mail capacity to your Tomcat installation! Although you'll never need to deal directly with mail.jar from your Roller blog, it's necessary to install this file before attempting to install Roller because it contains all the Java code required to send e-mail messages. There's one more file that the Roller needs to send e-mails, and we'll see how to download and install it in the next exercise.

The JavaBeans Activation Framework API

The JavaBeans Activation Framework (JAF) API allows Java developers to use standard services for working with arbitrary pieces of data in a uniform way. Roller uses the JavaMail and JAF APIs to send e-mail notifications. You need to put the mail.jar and activation.jar files on Tomcat's lib folder, so Roller can use them. We already saw how to download and copy mail.jar to your Tomcat's lib folder. Now let's see how to do the same with activation.jar.