Troubleshooting
Problem
This document describes the recommended way to use the JavaMail and the Activation framework with IBM Technology for Java on IBM i 6.1 and beyond.
Resolving The Problem
There have been a few documented instances where an application using the JavaMail API works in the Classic JVM; however, it fails when attempting to use the IBM Technology for Java JVM on IBM i. These problems have been resolved by making some subtle changes to the classpath.
The focus of this document is to describe how to use JavaMail and/or JAF with the IBM Technology for Java VM. There was never any intent to make sure that the Classic JVM and IBM technology for Java JVM behave exactly the same.
Implementing JavaMail using IBM Technology for Java on IBM i
The JavaMail API is available as an optional package. Also required is the JavaBeans Activation Framework (JAF) extension.
You can download these required optional packages from JavaMail API or you can find a somewhat older version (v1.2) of them on the IBM i system in the following directory:
/QIBM/ProdData/OS400/Java400/ext/
...
mail.jar
activation.jar
IBM does not maintain this JavaMail API version on a regular basis. To download the latest JavaMail API implementation version, please visit the primary JavaMail API project page here.
To use these packages, you must include them in the Java classpath. Following is a sample invocation that includes the classpath environment variable:
java -Djava.class.path=/QIBM/ProdData/OS400/Java400/ext/activation.jar:/QIBM/ProdData/OS400/Java400/ext/mail.jar MySampleMailPgm
FAQs that explain the JavaMail API
Q: How do I get an implementation of the JavaMail API?
A: Oracle provides a royalty-free reference implementation, in binary form, that developers may use and ship. The reference implementation includes the core JavaMail packages and IMAP, POP3, and SMTP service providers. The reference implementation may be downloaded here.
Q: How do I send feedback or comments?
A: Please read the JavaMail FAQ! Read it again. Tell everyone you know to read it. Thank you!
You can search for and post questions to the JavaMail forums here on java.net, and the JavaMail OTN forum. You can also join this project and subscribe to the "users" mailing list. Or, send mail directly to the JavaMail team at javamail_ww@oracle.com.
Q: What JDK does the JavaMail API need?
A: The JavaMail API requires JDK/JRE 5.0 or higher. The JavaMail API is a Java optional package; it is not part of the core Java SE; however, it is included in Java EE.
Q: Where can I find a version of JavaMail for my favorite operating system?
A: JavaMail is completely written in Java and will run on any operating system that supports the required version of the JDK. No special version is needed for different operating systems.
Q: Is the JavaMail API supported by IBM through your IBM SWMA support contract?
A: No, IBM will attempt to assist you on a best effort basis only. Official support for the JavaMail API is provided via the JavaMail API project page here.
For more FAQs, you should refer to the following Web site:
JavaMail API FAQ
Historical Number
562770016
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1012250