这是我在window下启动的 bat文件 @echo on
@setlocal EnableDelayedExpansion
@for %%i in (%dir_path%\*.jar,%dir_path%\lib\*.jar) do (
@set other_path=!other_path!;%%i
)
set classpath= %other_path%
@java -jar demo.jar
@endlocal
@pause换成linux下,应该怎么写啊~~??
@setlocal EnableDelayedExpansion
@for %%i in (%dir_path%\*.jar,%dir_path%\lib\*.jar) do (
@set other_path=!other_path!;%%i
)
set classpath= %other_path%
@java -jar demo.jar
@endlocal
@pause换成linux下,应该怎么写啊~~??
classpath=''
for file in *.jar lib/*.jar
do
classpath="$classpath:$file"
done
java -jar demo.jar