On Mon, Jun 16, 2003 at 11:30:50AM +0530, Shanu wrote: > > Hi Paul, > Following script can be used to set the path dynamically.. > > #!/bin/tcsh > set classpath=. > set alljars="" > foreach i (`find . -name "*.jar"`) > set alljars=($i":"$alljars) > end > set CLASSPATH=($CLASSPATH$alljars$classpath) > echo $CLASSPATH > export $CLASSPATH > > So, tomorrow even if you add some jars in /home/paul/java/jars/ dir > and run the script from the same dir would add for you, all the jar files > in the :/home/paul/java/jars/ dir and its subdir to the classpath. >
This would add *every* jar to my CLASSPATH, which I guess is what I want. Should the fourth line not be: foreach i (`find / -name "*.jar"`) ? What happens if I am in a directory /home/paul/Documents? Then again, I guess that find will choke if it tries to find files in a directory to which I have no access. Nevertheless, this script is very poweful simple, and it is what I wil use! Thanks Paul -- ************************ *Paul Tremblay * [EMAIL PROTECTED] ************************ ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]