linux bash:
YOUR_LIB=your_path
for jar in `ls $YOUR_LIB/*.jar`
do
CLASSPATH="$CLASSPATH:""$jar"
done
windows :
SETLOCAL ENABLEDELAYEDEXPANSION
set LIB=xx
set CLASSPATH=.
FOR %%C IN (LIB*.jar) DO set CLASSPATH=!CLASSPATH!;%%C
echo %CLASSPATH%