Getting error

i am getting this error while trying to run a sample program .

any kind of help would be appreciated

DEBUG: JavaMail version 1.3.2

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/Lin

eInputStream

at javax.mail.Session.loadProvidersFromStream(Session.java:897)

at javax.mail.Session.access$000(Session.java:151)

at javax.mail.Session$1.load(Session.java:848)

at javax.mail.Session.loadFile(Session.java:1002)

at javax.mail.Session.loadProviders(Session.java:857)

at javax.mail.Session.<init>(Session.java:187)

at javax.mail.Session.getInstance(Session.java:226)

at TestEmail.main(TestEmail.java:26)

[711 byte] By [Michel0301a] at [2007-10-3 6:40:06]
# 1
Perhaps your mail.jar file is corrupted?You're using the JavaMail mail.jar file unmodified, right?
bshannona at 2007-7-15 1:28:54 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
hi..sorry i was busy..i have downloaded again both files (mail.jar and activation.jar)..and tried it again...but getting d same error...plz help me.........
Michel0301a at 2007-7-15 1:28:54 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

error is as follows...

and u told me that i hv used unmodified jar file...is there anything to be modified ?

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/util/Lin

eInputStream

at javax.mail.Session.loadProvidersFromStream(Session.java:897)

at javax.mail.Session.access$000(Session.java:151)

at javax.mail.Session$1.load(Session.java:848)

at javax.mail.Session.loadFile(Session.java:1002)

at javax.mail.Session.loadProviders(Session.java:857)

at javax.mail.Session.<init>(Session.java:187)

at javax.mail.Session.getInstance(Session.java:226)

at TestEmail.main(TestEmail.java:26)

Michel0301a at 2007-7-15 1:28:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Perhaps you have more than one version of the javax.mail classes

in your CLASSPATH. Make sure there's only one copy of mail.jar

in your CLASSPATH. Check the jre/lib/ext directory as well. And if

you're running in a web server or application server, it may be providing

its own version of mail.jar.

bshannona at 2007-7-15 1:28:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
Thanks a lot ...bshannonit worked...byeee
Michel0301a at 2007-7-15 1:28:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 6
For the benefit of others who might have the same problem,what exactly was your problem and what did you do to fix it?
bshannona at 2007-7-15 1:28:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 7

actually...i was getting exception at runtime what i have written above..

i had more than one mail.jar files in my classpath...when i made sure that there was only one mail.jar file in classpath....

it worked fine....i was not able to think that way before ur suggestion...

little problem is always more complex....

Michel0301a at 2007-7-15 1:28:55 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...