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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Classpath

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
CA
I'm trying to set my classpath for my java classes,

I use : set CLASSPATH=$CLASSPATH:/path/to/classes
and then if I do set | grep CLASSPATH, the entry is there, but if I change directory or even get a directory listing and check the classpath again, there is no entry. I tried putting the enty in /etc/profile as well, and that doesn't work. Any ideas?

Thanks
 
Hi,

I have stuff like this in my /etc/profile :

CLASSPATH=/var/tomcat4/common/lib/servlet.jar:/usr/local/jdk1.3.0_02/jre/lib:.
JAVA_HOME=/usr/local/jdk1.3.0_02
JAVA_PATH=/usr/local/jdk1.3.0_02
export JAVA_HOME JAVA_PATH CLASSPATH

(i.e. you use 'export' to export the variables)

Type 'env' to get the values of the current environment variables.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top