Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Adding javamail library

Thread view: 
Justin - 05 Apr 2007 20:19 GMT
I am using NetBeans IDE 5.5.  I am writing an application that needs
to send emails.  I downloaded the javamail.zip file from the Sun site,
but I cannot for the life of me figure out how to incorporate the file
into my library.  If anyone could explain or send me a detailed how-
to, it would be much appreciated.

Thanks
CodeForTea@gmail.com - 06 Apr 2007 12:23 GMT
> I am using NetBeans IDE 5.5.  I am writing an application that needs
> to send emails.  I downloaded the javamail.zip file from the Sun site,
[quoted text clipped - 3 lines]
>
> Thanks
extract the zipfile using winzip.

Read the "README.txt" in javamail-1.4 directory
David Segall - 06 Apr 2007 14:48 GMT
>I am using NetBeans IDE 5.5.  I am writing an application that needs
>to send emails.  I downloaded the javamail.zip file from the Sun site,
[quoted text clipped - 3 lines]
>
>Thanks
Use any unzip program to extract the files into a directory. On my
Windows XP system Sun chose to install the JDK and JRE in a
sub-directory of C:\Program Files\Java so that is where I put my
libraries. I will assume that your unzipped files ended up in
C:\Program Files\Java\javamail-1.4.

Now open NetBeans and use the menu Tools->Library Manager and click
the "New Library" button. Choose a name for the Library; I chose
JavaMail. Leave the Library Type as "Class Libraries". In the
Classpath tab press "Add Jar/Folder" and enter the full path of
mail.jar. In my case it is C:\Program
Files\Java\javamail-1.4\mail.jar. You don't have the source code so
ignore that tab, click Javadoc and enter the full path to the library
Javadocs. In my case it is C:\Program
Files\Java\javamail-1.4\docs\javadocs.

To complete the task you must add the JavaMail library to your project
so open your project, right click on Libraries, choose Add Library,
select JavaMail and you're done.

Well no, you have not finished :( JavaMail relies on the Java
Activation Framework so you need to repeat the above procedure
starting with the download of the Activation Framework from
<http://java.sun.com/products/javabeans/jaf/downloads/>.

You could add the Activation Framework jar and Javadocs to the Java
Mail library but I think it is preferable to keep them separate in
case you want to use the Activation Framework in a project that does
not need JavaMail.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.