网学网C/C++编辑为广大网友搜集整理了:java classpath 批量设置脚本绩等信息,祝愿广大网友取得需要的信息,参考学习。
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%