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 / JavaBeans / January 2004

Tip: Looking for answers? Try searching our database.

how to use javamail????

Thread view: 
martin - 26 Jan 2004 20:19 GMT
A *beginners* question.

I make use of Netbeans IDE 3.5.1

I'd like to make some application which is able to send mail.
So I found out that the API "javamail" might be useful.

I looked around on Sun's site, and saw that I also needed a package Javax
Activation.
I downloaded this, and afterwards I downloaded the javamail-package.

But What should I do with all the content of these zip-files?? Where should
I place all those files (from JAF.zip and from javamail.zip) in order to use
them from within the Netbeans IDE??

and another question would be: which class would help me with downloading
files from a certain URL, and place them in a certain directory??

any help would be kindly appreciated! ;-)

best regards,
martin
Juha Laiho - 27 Jan 2004 20:07 GMT
"martin" <nobody@nowhere.org> said:
>A *beginners* question.
>
>I make use of Netbeans IDE 3.5.1

Yep, the dilemma with IDEs and beginners -- IDEs are easy to use, but
can be a pain to configure.

>I'd like to make some application which is able to send mail.
>So I found out that the API "javamail" might be useful.
[quoted text clipped - 6 lines]
>I place all those files (from JAF.zip and from javamail.zip) in order to use
>them from within the Netbeans IDE??

You don't need to expand the zip files - neither for regular non-IDE
environment nor for NetBeans. For a regular non-IDE runtime environment,
you name the files in your CLASSPATH environment variable (or otherwise
have the files includes in your classpath). For NetBeans, you need to
mount the zip files as code libraries to your project. This is done by
right-clicking on the "Filesystems" icon on the explorer pane, then
choosing Mount->Archive Files, and navigating to the location of your
.zip file.

>and another question would be: which class would help me with downloading
>files from a certain URL, and place them in a certain directory??

Hmm.. java.net.URLConnection and specifically java.net.HttpURLConnection
should be pretty much what you're looking for (and of course the regular
Java file handling classes to get the data fetched from the URL into
a file).
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

martin - 28 Jan 2004 09:02 GMT
Thanks for all the information.

I did as you said: mounted the zip-files.
But it still won't work. The IDE seems to have difficulties with certain
JAVAX packages.
I read somewhere that not all the JAVAX packages are included in the
netbeans IDE, because this Netbeans relies on J2SE, while the javax I need
is in J2EE. Does this sound familiar to you?
Do you happen to know if there is any smooth way of getting these
javax-packages included under Netbeans-IDE??

kind regards,
martin

> "martin" <nobody@nowhere.org> said:
> >A *beginners* question.
[quoted text clipped - 31 lines]
> Java file handling classes to get the data fetched from the URL into
> a file).


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



©2008 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.