I am trying to send an AutoGeneratedEmail from my javaapplication. The jar files I use are mail.jar and activation.jar. But somehow both are not compatible and my code does not work. My code is
And when I run without activation.jar it gives following error Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource at com.vero.vas.email.EmailUtils.sendIfSaleEmail(EmailUtils.java:33) at com.vero.vas.client.app.TestSendingEmail.main(TestSendingEmail.java:12)
Can someone tell me how to know the dependancy of mail.jar on activation.jar?
check the version of Javamail Api and JavaBeans Activation Framework(JAF)which contains mail.jar and activation.jar respectively and must include both jar files in classpath otherwise use JAVA SE6 because it already included the activation.jar
Joined: Sep 09, 2008
I have set classpath for both the jars. The versions used are javamail-1_4_1.zip and jaf-1_1_1.zip respectively. Since my office uses this jdk version i cant update it to 6.