Building Your Classpath Dynamically
November 30 2006 09:55 AM

Simply place the following find command after your -classpath switch on your commandline:

`find ./path/to/your/jars -name "*.jar" -exec echo -n "{}:" \;`

Important - those are backticks, not quotes, that surround the find command. One pain is that there will be a trailing colon. Not sure how to suppress that (probably by piping the mess to sed) but I didn't need to worry about it because I had to append the directory where my class file lived anyways.

Comments (0), Add Comment