Go Premium for a chance to win a PS4. Enter to Win

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

Can not find mail package

Hello experts,

I work on Linux and want to send e-mails with Java code. However, when I compile it, I get

[cat@app07 paypal432]# javac CCBatchDev.java
CCBatchDev.java:17: package javax.mail does not exist
import javax.mail.*;
^
CCBatchDev.java:18: package javax.mail.internet does not exist
import javax.mail.internet.*;

but I already added the dir that contains "activation.jar" and "mail.jar" to classpath. Look at this:

[cat@app07 paypal432]# echo $CLASSPATH
/opt/jdk1.6.0_14/bin:/usr/local/mgpackages

Anybody knows why my code still can't find the mail modules?

Thanks so much.
0
davidw88
Asked:
davidw88
1 Solution
 
davidw88Author Commented:
Hi experts,

Any comments?

Thanks.
0
 
Amitkumar PanchalSr. ConsultantCommented:
try the following.

set your classpath as given below

/opt/jdk1.6.0_14/bin:/usr/local/mgpackages/activation.jar:/usr/local/mgpackages/mail.jar
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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