This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A JavaMail exception, can you explain?  RSS feed

 
Mark Lau
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was testing the following JavaMail code. The compile is successful, but when I run it like
java SendMailEx smtp.myuniv.edu myemail@hotmail.com myfriendsemail@yahoo.com
I got the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Address
What does this mean? And what is the problem? Thanks.
// The code is attached here.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means what it says - for some reason it can't find the Address class. Possibly a problem with Classpath. What environment did you compile it in?
Bill
 
Mark Lau
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I compiled it under W2k Professional. I just copied the mail.jar and activiation.jar files from the tomcat directory to JDK_HOME\jre\lib\ext. Is this fine?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!