欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Windows下遍历某个目录下的jar并赋给变量classpath windowscmd 

程序员文章站 2022-05-31 21:29:29
...
////////////begin///////////
@REM define jar source set
set QSNODE_JAR_SET=%QSNODE_COMM%\*.jar,%APPLICATION_LIB%\*.jar,%QSNODE_LIB%\*.jar

echo Begin to append needed jar file

set TMP_CLASSPATH=

@REM append jar in a-z order
for %%i in (%QSNODE_JAR_SET%) do (call :append %%i)
goto okClasspath

:append
set TMP_CLASSPATH=%TMP_CLASSPATH%;%1
goto :end

:okClasspath
set CLASSPATH=%CLASSPATH%%TMP_CLASSPATH%;%QSNODE_CONF%;%APPLICATION_CONF%
echo CLASSPATH is [%CLASSPATH%]
echo Finish doing append needed jar file

:end
////////////end///////////
相关标签: windows cmd