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