Results 1 to 2 of 2
  1. #1
    oregon is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default Java mail api exception

    I'm trying to use the java mail api.
    this is my code, I hope you can help me
    Java Code:
    Properties properties = System.getProperties();
    properties .put("mail.smtp.host", host);
    Session session = Session.getDefaultInstance(properties , null);
    Message msg = new MimeMessage(session);
    and this is the error:
    Java Code:
    java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream"

  2. #2
    Ed
    Ed is offline Senior Member
    Join Date
    Jun 2007
    Posts
    110
    Rep Power
    0

    Default

    If it compiles the jars should be on your system already. Just grep for .*ail.*jar and they should show up.

Similar Threads

  1. a problem about java mail client program
    By lunarstyle in forum AWT / Swing
    Replies: 9
    Last Post: 12-19-2009, 05:14 PM
  2. Retreiving of mail body using mail number
    By chandu.v09 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-13-2008, 03:25 PM
  3. java mail server
    By krismedia in forum New To Java
    Replies: 2
    Last Post: 01-23-2008, 05:41 AM
  4. Send a pic through mail, in java
    By lenny in forum Advanced Java
    Replies: 1
    Last Post: 07-25-2007, 03:49 PM
  5. Sending a mail with the local mail program
    By thedude in forum Advanced Java
    Replies: 2
    Last Post: 07-23-2007, 01: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
  •