• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to add mail.jar to classpath?

 
jenny brad
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got some errors by using import:

import javax.mail.Message;
import javax.mail.Address;
import javax.mail.Transport;
import javax.mail.Multipart;
import javax.mail.Part;
import javax.mail.BodyPart;
import javax.mail.Session;
import javax.mail.Flags;
import javax.mail.MessagingException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.AddressException;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;


I think that I need to get the java mail APIs to my IDE. I did some research and found that I need to download mail.jar and activation.jar to use the mail api.

The only files I could find are javamail-1_4.zip, and jaf-1_1-fr.zip. are these the right ones to download?

after I downloaded these files, I included them in my classpath, but I still got the same errors as before. what is the correct way to do this?

Thank you!
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll know if they are the right ones to download (after you downloaded them) by looking inside them. If they contain mail.jar and activation.jar (and maybe a bunch of other things) then they were the right ones. Of course you'll have to extract the jar files from them and put them somewhere in your file system. Then adjust your classpath to include those jar files. You do know how to work with zip files, right? Or do you need a quick explanation of those?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!