dcsimg
JavaMail 1.2: Example program msgsend fails execution @ 1st call to a JavaMail API.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, January 11, 2002 11:56 AM

System: Windows Millenium Java: 1.3.1 standard edition MsDos command interface: C:>cd C:John'sJava; How To ProgramJavaMail 1.2demo C:>java msgsend -o jsk@cruzio.com -M mail.cruzio.com jsk@cruzio.com Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message C:>set PATH=C:Windows;C:WindowsCommand;c:UsrBin;C:Program FilesSunJdk 1.3.1Bin winbootdir=C:WINDOWS windir=C:WINDOWS BLASTER=A220 I5 D1 T4 P330 TMP=C:Tmp PROMPT=$n:$g DIRCMD=/p/o/l TEMP=C:UsrTmp WINDIR=C:Windows WINBOOTDIR=C:Win   More>>

System: Windows Millenium

Java: 1.3.1 standard edition



MsDos command interface:

C:>cd

C:John'sJava; How To ProgramJavaMail 1.2demo



C:>java msgsend -o jsk@cruzio.com -M mail.cruzio.com jsk@cruzio.com

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



C:>set

PATH=C:Windows;C:WindowsCommand;c:UsrBin;C:Program FilesSunJdk 1.3.1Bin

winbootdir=C:WINDOWS

windir=C:WINDOWS

BLASTER=A220 I5 D1 T4 P330

TMP=C:Tmp

PROMPT=$n:$g

DIRCMD=/p/o/l

TEMP=C:UsrTmp

WINDIR=C:Windows

WINBOOTDIR=C:Windows

COMSPEC=C:WindowsCommand.Com

CLASSPATH=C:Program FilesSunJdk 1.3.1;.

CMDLINE=DosKey /Insert



C:>dir "c:Program Filessunjdk 1.3.1jrelibext



Volume in drive C is HP_PAVILION

Volume Serial Number is 3F72-11E9

Directory of C:Program FilesSunjdk 1.3.1jrelibext



. 09-11-01 7:03p .

.. 09-11-01 7:03p ..

activa~1 jar 45,386 05-21-99 2:14p activation.jar

imap jar 102,403 12-01-00 12:08a imap.jar

mail jar 280,984 12-01-00 12:08a mail.jar

mailapi jar 153,117 12-01-00 12:08a mailapi.jar

pop3 jar 15,314 12-01-00 12:08a pop3.jar

smtp jar 11,902 12-01-00 12:08a smtp.jar

6 file(s) 609,106 bytes

2 dir(s) 23,373.86 MB free



C:>javac *.java

Note: Some input files use or override a deprecated API.

Note: Recompile with -deprecation for details.

   <<Less

Re: JavaMail 1.2: Example program msgsend fails execution @ 1st call to a JavaMail API.

Posted By:   raghu_subramanian  
Posted On:   Thursday, January 17, 2002 06:36 AM

Hi,


U need to set the CLASSPATH to point to
javamail-1.2mail.jar and u also need to point the CLASSPATH to an activation.jar which can be obtained by downloading the Java Activation Framework from the www.java.sun.com website.





Try setting u r classpath var in dos promt like this..,assuming u will download javamail and jaf to u r C drive.





set CLASSPATH=%CLASSPATH%;C:javamail-1.2mail.jar;C:jaf-1.0.1activation.jar




rgds,
rags

About | Sitemap | Contact