how can I add CLASSPATH in a script shell

jsn

Registered
Hi

I am running the script shell runsh.sh that starts netbeans or forte. This script creates a CLASSPATH variable and I would like to add a new .jar file.

How do you add a new path to CLASSPATH when it already has values. I would like to do something like CLASSPATH = CLASSPATH + mypath.

thanks
jsn
 

beamso

Registered
I'm unsure about which shell you're using, but it's usually:

CLASSPATH=$CLASSPATH:/path/to/other/jars:/path/to/other/classes

for bash, or for csh:

CLASSPATH=`echo $CLASSPATH`:/path/to/other/jars:/path/to/other/classes

Hope this helps...
 
Top