views:

17

answers:

1

I am trying to use Java Mail to send emails with my program but whenever I compile on the command line I get this:

RevenueSummary.java:13: package java.mail does not exist
import java.mail.*;

I have the mail.jar and activation.jar in my /Library/Java/Extensions folder so I'm not sure why it cannot find it.

I've also tried changing my CLASSPATH with: export CLASSPATH=$CLASSPATH:/Library/Java/Extensions/mail.jar:/Library/Java/Extensions/activation.jar

Please let me know how to fix this so I can finish. (Using Mac OS 10.6.4)

+1  A: 

You should import javax.mail.

spbfox
Thanks for the help :D
TrentEllingsen
You are very welcome.
spbfox