Results 1 to 2 of 2

Thread: Mail error

  1. #1
    orchid's Avatar
    orchid is offline Member
    Join Date
    Apr 2007
    Location
    Midwest
    Posts
    60
    Rep Power
    0

    Default Mail error

    Am new to sending mail and am getting this error when I try to send. Am using Eclipse and the class compiles but fails when it runs.
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource at test.MailTest.mail(MailTest.java:51)
    This is line 51:
    Java Code:
    Message msg = new MimeMessage(session);
    thanks.

  2. #2
    derrickD is offline Member
    Join Date
    Apr 2007
    Location
    USA
    Posts
    50
    Rep Power
    0

    Default

    When using javax mail you need to have a jar called activation.jar in your path. That will make this error go away.

Similar Threads

  1. mail concept
    By indirani in forum New To Java
    Replies: 3
    Last Post: 04-16-2008, 01:30 PM
  2. mail
    By indirani in forum New To Java
    Replies: 4
    Last Post: 04-11-2008, 01:12 PM
  3. mail concept
    By thamizhisai in forum Advanced Java
    Replies: 4
    Last Post: 04-11-2008, 07:19 AM
  4. Retreiving of mail body using mail number
    By chandu.v09 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-13-2008, 02:25 PM
  5. Sending a mail with the local mail program
    By thedude in forum Advanced Java
    Replies: 2
    Last Post: 07-23-2007, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •