[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

What to put in CLASSPATH for javax.mail ?

Hi,
My java application is dependent on javax.mail package.
What do I need to put in classpath for this?

I am using java 1.4 now (Standard version - not EE)?

Let me know.

_Esam
0
_Esam
Asked:
_Esam
  • 7
  • 3
1 Solution
 
Mayank SAssociate Director - Product EngineeringCommented:
Put mail.jar and activation.jar (full directory-path including file-name). If you are using mailapi.jar, pop3.jar, smtp.jar then put them as well.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
If you don't have them, download from: http://java.sun.com/products/javamail/downloads/
0
 
Mayank SAssociate Director - Product EngineeringCommented:
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Mayank SAssociate Director - Product EngineeringCommented:
You can also place the JARs in your JRE's lib\ext folder in which case they don't need to be added to the class-path
0
 
_EsamAuthor Commented:
>You can also place the JARs in your JRE's lib\ext folder

Where do I put it if I am only using Eclipse?

_Esam
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Add them to the project's build path using Project -> Properties -> Java build path -> Add external JARs.

Or place them in the lib\ext of the JRE which Eclipse is using (it will be seen below in the project in the explorer)
0
 
_EsamAuthor Commented:
Which version of javamail I should use for java 1.4?

I put 1.3.2 (?) in the project classpath..the project didn't find it...
_Esam
0
 
Mayank SAssociate Director - Product EngineeringCommented:
1.3.2 should work. So should 1.4 I guess (unless it uses Java 5 features). How did you put it in the class-path? Did you add it to the build-path like I told?
0
 
_EsamAuthor Commented:
I used as you told me to:

> Project -> Properties -> Java build path -> Add external JARs.

There are some error due to missing the jars?

What are these? > mail.jar and activation.jar

And why these also:> If you are using mailapi.jar, pop3.jar, smtp.jar then put them as well.

Thanks.
_Esam.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> What are these? > mail.jar and activation.jar

mail.jar is the main JAR for the Java mail API. It also uses the Java beans activation framework so you need activation.jar in the class-path too.

What are the errors you are getting?
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 7
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now