我試圖通過run.bat -Djava.messaging.ServerPeerID = 1,但args'='被替換爲空格。所以傳遞給Main.java的參數被設置爲java.messaging.ServerPeerID的true,但它不應該是。主應該已經得到了ARG作爲適當.....run.bat命令行JVM參數未按預期方式傳遞
樣品一段代碼
set ARGS =
:loop1
if %1= "" goto contiArg
else (
# my echo here : echo " Args ... %1"
Set ARGS = %ARGS% %1
Shift
)
Goto loop1
行我回聲線被扔errorven我用雙引號爲u提到.....
'的run.bat 「-Djava.messaging.ServerPeerID = 1」'? – npocmaka