File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Unable to import javax.activation.* Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to import javax.activation.*" Watch "Unable to import javax.activation.*" New topic

Unable to import javax.activation.*

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761
I'm not able to import javax.activation.*;

Which jar file i need ?

i have downloaded mail APIs

DataSource source = new FileDataSource(filename); //not working

Jigar Naik

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Download java activation framework project jar.
Required for mime support in e-mail


Rahul Bhattacharjee
LinkedIn - Blog
Yogendra Joshi
Ranch Hand

Joined: Apr 04, 2006
Posts: 213
Rahul said correct , You need activation.jar and mail.jar in your classpath. It works just well..

Follow the link which Rahul has given and download activation.jar. Put it in lib directory of your app , restart the server and then check.

If still you have a problem , get back to us.


Yogendra Joshi.

Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761
Thanks a lot
I agree. Here's the link:
subject: Unable to import javax.activation.*
It's not a secret anymore!