Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Javamail problem: works in java 1.5 not java 1.42  RSS feed

 
Richard Vagner
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have the following code work in Java1.5. However I could not make it work in Java 1.42 and I need it work in 1.42 because our prod server does not have 1.5.

I have activation.jar, mail.jar, mailapi.jar all set in eclipse build path. Why am I getting that error?

Please throw some light on this?




ERROR:

 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are they also in your classpath?
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it's almost certainly a classpath error. But I would recommend using only mail.jar and activation.jar. The other jar files such as mailapi.jar are subsets of mail.jar (created back in the days when a 300KB jar file was annoyingly large) and as such can lead to confusing classloading errors.
 
Richard Vagner
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob and Paul,

Somehow it is caused by a bad jre. Once I reinstalled jre, it is ok. I have also removed mailapi.jar. Thanks for the suggestion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!