I want to add paths to a CLASSPATH variable but if I use the :
setenv CLASSPATH /opt
all previous entries are erased. How do I append additional entries to a system variable without overwriting the original value.
Thanx
I want to add paths to a CLASSPATH variable but if I use the :
setenv CLASSPATH /opt
all previous entries are erased. How do I append additional entries to a system variable without overwriting the original value.
Thanx
try setenv $CLASSPATH:/opt
You might also want to consider ...
export CLASSPATH=$CLASSPATH:/opt
this will add /opt to the END of the classpath - i.e. will look in this directory last ....
ALTERNATIVELY
export CLASSPATH=/opt:$CLASSPATH
This will add /opt at the front of the classpath. This will then look here first....can be important if the target file appears in multiple parts of the path....and the files differ - you need to make sure the one you are wanting is earlier in the classpath.
Thats' great.
Thanks for your help
Ian