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 / July 2007

Tip: Looking for answers? Try searching our database.

Question for distributing a program using Java Mail

Thread view: 
Justin - 09 Jul 2007 21:04 GMT
I have a program that I have written that utilizes the Java Mail (and
the Activation Framework).  I wrote the program in Netbeans 5.5 IDE.
When I build an executable JAR file, a "dist" folder is created.
Inside the folder is a "lib" folder where the compiled libraries
(Activation and Mail) are put.  Now, when I go to run the program
through the Jar file, which remains in the dist folder, the program
fails when it tries to use Java Mail.  I am still relatively new to
Java, but I am guessing it isn't working because the Java Mail library
comes with some of it's own JAR files that arent copied to the
program's "lib" file.  My question is, how do I get the program to
work?

Thanks
Roedy Green - 09 Jul 2007 21:07 GMT
> My question is, how do I get the program to
>work?

This is one of the problems with JavaMail.  You somehow have to get
the clients to install it. You might find Java Web Start is the way to
fly.  It will download and install code for you, and it will download
and install the JavaMail jars too.

see http://mindprod.com/jgloss/javawebstart.html

Perhaps you might use JAWS to just install your JavaMail client
program.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Arne Vajhøj - 10 Jul 2007 00:39 GMT
> I have a program that I have written that utilizes the Java Mail (and
> the Activation Framework).  I wrote the program in Netbeans 5.5 IDE.
[quoted text clipped - 7 lines]
> program's "lib" file.  My question is, how do I get the program to
> work?

Put a Class-Path directive in the manifest in your jar file that
point to the other two jar files.

Then distribute the 3 jar files together and it should work fine.

Arne


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.