[url]http://wmuu.iteye.com/blog/325079[/url]
linux bash:
[color=darkblue]YOUR_LIB=your_path
for jar in `ls $YOUR_LIB/*.jar`
do
CLASSPATH="$CLASSPATH:""$jar"
done [/color]
mvn自动打包和运行
[color=darkblue]#! /bin/bash
for jar in `ls /mnt/d/work_documents/workspace/JBPM5Server/lib/*.jar`
do
CLASSPATH="$CLASSPATH:""$jar"
done
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$CXF_HOME/lib:$CLASSPATH
mvn clean
mvn dependency:copy-dependencies -DoutputDirectory=lib
mvn package
cd target/JBPM5Server/WEB-INF/classes
clear
java -classpath $CLASSPATH org.jbpm.DemoTaskService
[/color]
windows :
[color=darkblue]SETLOCAL ENABLEDELAYEDEXPANSION
set LIB=xx
set CLASSPATH=.
FOR %%C IN (%LIB%\*.jar) DO set CLASSPATH=!CLASSPATH!;%%C
echo %CLASSPATH% [/color]
linux bash:
[color=darkblue]YOUR_LIB=your_path
for jar in `ls $YOUR_LIB/*.jar`
do
CLASSPATH="$CLASSPATH:""$jar"
done [/color]
mvn自动打包和运行
[color=darkblue]#! /bin/bash
for jar in `ls /mnt/d/work_documents/workspace/JBPM5Server/lib/*.jar`
do
CLASSPATH="$CLASSPATH:""$jar"
done
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$CXF_HOME/lib:$CLASSPATH
mvn clean
mvn dependency:copy-dependencies -DoutputDirectory=lib
mvn package
cd target/JBPM5Server/WEB-INF/classes
clear
java -classpath $CLASSPATH org.jbpm.DemoTaskService
[/color]
windows :
[color=darkblue]SETLOCAL ENABLEDELAYEDEXPANSION
set LIB=xx
set CLASSPATH=.
FOR %%C IN (%LIB%\*.jar) DO set CLASSPATH=!CLASSPATH!;%%C
echo %CLASSPATH% [/color]