Results 1 to 7 of 7
  1. #1
    dalu is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default java.lang.ClassNotFoundException: javax.mail.internet.AddressException

    I am involved in a project Where I need to give an emailID as a user input and I need to validate the input before updating it in the database. My code part is as given below..
    String emailid=JTextField6.getText();
    if(emailid.length()!=0){
    try {
    InternetAddress internet_id = new InternetAddress(emailid);
    internet_id.validate();
    }
    catch (AddressException e) {
    JOptionPane.showMessageDialog((new JFrame()),
    "Enter a valid email Address");
    e.printStackTrace();
    return;



    This works fine when i run the applet in eclipse but when I use the browser, I get the following error :
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/mail/internet/AddressException
    at userinterface.TabbedPane1.setUpConnections(TabbedP ane1.java:1192)
    at userinterface.TabbedPane1.init(TabbedPane1.java:15 9)
    at userinterface.TabbedPane1.<init>(TabbedPane1.java: 1448)
    at userinterface.MainClass$JTree1_CardPanel1_conn.val ueChanged(MainClass.java:1791)

    ...
    etc...Do I need to change the java settings in my browser??

  2. #2
    dalu is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Also I wanted to know why it worked fine in Eclipse but am getting error using browser to run the example??

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    You probably haven't included the mail.jar in your class path (or whatever it's called for applets).

  4. #4
    dalu is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Hi Tolls,
    Thanks for the reply.
    But I couldnt find an archive named mail.jar. Does this mean I have not installed it? Or that my java doesnt have it ?? I dont know if its a foolish question to ask ...But I am very new to java and not thorough with its jars and classpath concepts.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    You must have it somewhere if it works in Eclipse.

    Here's the download page.

  6. #6
    dalu is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default

    Hi ,
    Today I am facing an entirely new problem with my project. The changes I did in my project is not been updated in my browser. It runs fine with eclipse. But the browser seems to use my old file. Where does it find the cached file from??

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default

    No idea.
    Are we talking an Applet here?
    If so, have you changed the APPLET tag or whatever so that it includes the mail.jar?

Similar Threads

  1. Replies: 8
    Last Post: 11-04-2010, 01:46 PM
  2. problem with sending mail usin javaX.mail api
    By sandeepsai39 in forum New To Java
    Replies: 4
    Last Post: 11-25-2009, 05:37 AM
  3. Replies: 2
    Last Post: 05-05-2008, 06:01 AM
  4. java.lang.ClassNotFoundException
    By ravian in forum New To Java
    Replies: 1
    Last Post: 01-07-2008, 10:31 AM
  5. Replies: 1
    Last Post: 07-23-2007, 11:54 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
  •