2013-10-22 26 views

回答

5

你可以使用系統屬性

java -cp ... YOUR_TEST -DportNumber=1234 

然後在代碼中,你可以用

System.getProperty("portNumber") 
檢索
相關問題