Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Addr1

Hi All,

I am getting this error when am try to exeucte the jar file.

D:\>java -jar smirror.jar

Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Address

I have set the classpath like this :

D:\>set classpath=D:\javamail-1.4\mail.jar;D:\jaf-1.1\activation.jar;

But i dont no wat am missing..

but still am facing this same error ..please any explain me

Thanks in advance

Thanks

Prakash

[476 byte] By [prakash.nmsp@gmail.coma] at [2007-11-27 9:24:15]
# 1
if you are making a jar file use the manifest of your jar aplicationadd this, :Class-Path: path/jar1.jar path/jar2.jar;)
rj123a at 2007-7-12 22:20:00 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
The -jar option overrides the CLASSPATH setting. You need to referencethe mail.jar and activation.jar files in a Class-Path header in the MANIFEST.MFfile in your jar file.
bshannona at 2007-7-12 22:20:00 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Hi..

Thanks for ur updates ..

I have tried like this also..

This is manifest file :

Manifest-Version: 1.0

Main-Class: com.cisco.aidan.repository.watchdog.MirrorStatus

Class-Path: D:\javamail-1.4\mail.jar

if i use like this am getting this error..

D:\>java -jar newlaunch.jar

Exception in thread "main" java.lang.NoClassDefFoundError: com/cisco/aidan/repos

itory/watchdog/MirrorStatus

after this i have set my classpath like

d:\>set classpath=%classpath%;.;

D:\>java -jar newlaunch.jar

Exception in thread "main" java.lang.NoClassDefFoundError: com/cisco/aidan/repos

itory/watchdog/MirrorStatus

but again same error...

if am not using classpath in manifest am getting..

this error..

D:\>java -jar newlaunch.jar

Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Address

at com.cisco.aidan.repository.watchdog.MirrorStatus.<init>(MirrorStatus.

java:28)

at com.cisco.aidan.repository.watchdog.MirrorStatus.main(MirrorStatus.ja

va:200)

so please tell me what am missing der..

Thanks in advance

Thanks,

Prakash

prakash.nmsp@gmail.coma at 2007-7-12 22:20:00 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4

Well, that makes no sense. You must be doing something wrong.

Perhaps there's a typo in your manifest file?

Perhaps your manifest file isn't really being used when you

create the jar file?

In any event, you'll certainly need to include activation.jar in the Class-Path header

(although I don't think that's your problem here). Separate the entries with a space.

bshannona at 2007-7-12 22:20:00 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...