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///////////
@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///////////
上一篇: 孙权之女孙鲁班,她的感情史有多丰富?
下一篇: tomcat在cmd中部署到系统服务