Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting CLASSPATH 1

Status
Not open for further replies.

jeanpierre

Technical User
Jun 14, 2001
137
CA
I was working on a Java Mail exercise found at
Part of the tutorial involved downloading JavaMail API from Sun. Next I have to set the CLASSPATH to the mail.jar file in the download.

How do I set the CLASSPATH?

Is simply by copying mail jar to \jdk1.3\jre\lib\ext?

Thanks,

JP
 
Hi,
There are two ways of doing this.
1) In the command prompt give the command,
SET CLASSPATH=%CLASSPATH%;C:\zipfiles\mail.jar
or
2) While executing your application, you can run it as
java -cp .;c:\zipfiles\mail.jar;..... MailApp

In the ....., fill in all the required jar files.
(Here, I've assumed that your mail.jar is located in the c:\zipfiles directory and the name of your mail application to be MailApp)

Regards,
Rajarajan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top