#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    U.K.
    Posts
    15
    Rep Power
    0

    NoClassDefFoundError: Javax/Mail


    I have written a program that compiles and runs via Forte, that uses an email facitlity which works.
    I wish to run this from PC startup via a batch file.
    However I get the NoClassDefFoundError: Javax/Mail/MessagingException.
    I have ensured that the classpath is looking at the relevant .jar files - .;c:\Scanner\AdobeConnectables;c:\java;c:\java\package.
    What have I missed?

    Any takers out there?

    Thanks in advance.
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    I am just guessing, but I doubt you have the javamail directory in your classpath. it is an optional download. Did you go to http://java.sun.com/products/javamail/index.html and downlaod the zip file and unzip it somewhere?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    U.K.
    Posts
    15
    Rep Power
    0
    Hi Nemi,

    I am afraid it is. I copied all the .jar files in C:\Java\j2sdk1.4.1\jre\lib\ext and pasted them into C:\Java\Package.
    Nice and neat but absolutely no difference.
  6. #4
  7. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    the javax mail package does not come with the standard 1.4 sdk. it is an optional download. Please see that link I posted.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    U.K.
    Posts
    15
    Rep Power
    0
    These are the .jar files I have included in my c:\Java\Packages:

    activation
    dnsns
    j3daudio
    j3dcore
    j3dutils
    ldapsec
    localedata
    mail
    my-sql-connector-java-2.0.14-bin
    sunjce_provider
    vecmath

    Like I said in my first post, it works through Forte but not through the command line.
  10. #6
  11. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    In the classpath you need to specify individual jar files seperately. I.E.,
    Code:
    .;c:\Scanner\AdobeConnectables;c:\java;c:\java\package;c:\java\package\mail.jar
    Or you need to define a new extensions directory using the method described here.
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    U.K.
    Posts
    15
    Rep Power
    0
    Nemi, you rule.

    That has been the first suggestion that has actually worked that I have had from this forum.

    Mutch has a grassy arse. ('Thanks' in pigeon mexican)

IMN logo majestic logo threadwatch logo seochat tools logo