"javax.mail.NoSuchProviderExcception: smtp" exception when running executable jar file.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Shlayen
Posted On:   Tuesday, December 9, 2003 07:58 AM

I created mail sending application using JBuilder (9)environment.

When I run my program from within JBuilder, it is working perfectly, but when I create executable jar file and run it, it throws an exception: "javax.mail.NoSuchProviderExcception: smtp".

I placed mail.jar, smtp.jar, activation.jar, etc... into the classpath, but it doesn't help.

Re: "javax.mail.NoSuchProviderExcception: smtp" exception when running executable jar file.

Posted By:   Michael_Shlayen  
Posted On:   Wednesday, December 10, 2003 10:46 AM

FOUND THE PROBLEM!!!


Looks like ther is a bug in JBuilder-9 Personal!

I specified to attach all required classes and ALL ressources while building executable jar file, but JBuilder attached javamail library not completly.
Somehow under com.sun.mail it attached only utils directory, skipping all others.
After I manualy added all other directories, it start working.

Re: "javax.mail.NoSuchProviderExcception: smtp" exception when running executable jar file.

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, December 9, 2003 11:12 AM

...I placed mail.jar, smtp.jar, activation.jar, etc... into the classpath...


Note that on the CLASSPATH, all .jar files act as directories/folders, e.g. they each have to be explicitly given as separate entries on the CLASSPATH. You cannot just give the directory/folder where the .jar files are located!

About | Sitemap | Contact