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.