linux 批量引入文件夹下jar包
路径需要根据自己的电脑实际配置下。
#!/bin/sh
export JAVA_HOME=/var/lib/java
export PROJECT_HOME=/home/runner/***/WebRoot/WEB-INF
export PATH=$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=$JAVA_HOME/jre/lib:$PROJECT_HOME/classes:$CLASSPATH
# add all the jar
for loop in `ls $PROJECT_HOME/lib/*.jar`;do
export CLASSPATH=${loop}:${CLASSPATH}
done
java com.****.java....