萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> 編程語言綜合 >> java classpath 批量設置腳本

java classpath 批量設置腳本

    linux bash:

    YOUR_LIB=your_path

    for jar in `ls $YOUR_LIB/*.jar`

    do

    CLASSPATH="$CLASSPATH:""$jar"

    done

    windows :

    SETLOCAL ENABLEDELAYEDEXPANSION

    set LIB=xx

    set CLASSPATH=.

    FOR %%C IN (LIB*.jar) DO set CLASSPATH=!CLASSPATH!;%%C

    echo %CLASSPATH%

 

 

copyright © 萬盛學電腦網 all rights reserved