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 SkipVought 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
0
0
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
 
Are you constructing java applets or J2EE modules like servlets,JSP? Salih Sipahi
Software Engineer.
City of Istanbul Turkey
openyourmind77@yahoo.com
 
I would like to set the classpath for J2EE in Windows XP. Do I :

-Go to Environmental Variables in the Systems Folder
- and type in "set J2EE_HOME = c:\j2ee1.3.1" in the "path" entry

Have I done this correctly? It still asks me to set path for J2EE when
I attempt to run "Cloudscape".
 
Under which web service r u trying 2 run your J2EE applications?Tomcat,Websphere,WebLogic etc.? Salih Sipahi
Software Engineer.
City of Istanbul Turkey
openyourmind77@yahoo.com
 
I have not used Tomcat much, I am using WebLogic and in Weblogic to activate your classpath, all you have to do is put jour jar file in the lib directory of your application b4 deploying your web application into war file.Web Logic recognizes your classpath.I don't know how Tomcat does it but it may work. Salih Sipahi
Software Engineer.
City of Istanbul Turkey
openyourmind77@yahoo.com
 
How refreshing to here normal human beings explaining this stuff in English.
Thanks everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top