How to set CLASSPATH for Javamail

Y

yihan

Hello,
I added mail.jar and activation.jar into CLASSPATH. When compiling a java
file, e.g msgsend.java, successful, and generate msgsend.class. But when
excecuting msgsend, failed. It shows:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/mail/Message
I do as following:
in java compile file, add mail.jar and activation.jar into classpath:
@echo off
set
CLASSPATH=d:\;D:\Java\Javamail\javamail-1.3.2\mail.jar;D:\Java\Javamail\jaf-1.0.2\activation.jar
set PATH=%PATH%;C:\j2sdk1.4.1_02\bin
javac %1
pause

Can anybody tell me how to set CLASSPATH? Thank you.

Zhao
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top