dcsimg
How to check existence of JavaMail API?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ciro_bonano
Posted On:   Thursday, March 30, 2006 05:46 AM

Hi,

I want to use the JavaMail API, but give a gentle error message if it's not installed, and point the user to the download page. But I can't put my "import ..." statement on top of my java file, because that will fail if there is no JavaMail API, right? So how do I get out of this Catch-22?

Re: How to check existence of JavaMail API?

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, March 30, 2006 06:01 AM

execute Class.forName("javax.mail.Message"); and catch the ClassNotFoundException
About | Sitemap | Contact