aspose file tools*
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 751
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: 212
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: 751
Thanks a lot
I agree. Here's the link:
subject: Unable to import javax.activation.*
Similar Threads
mail servlet
DataSource class not found
Help with JavaMail
Is this possible?
j2ME package errors