Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException

package cn.dahuatech.netsdk;

public class Test {
	public static void main(String[] args) {
		System.out.println(args[0]);
	}
}

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
	at cn.dahuatech.netsdk.Test.main(Test.java:7)

解決方案是:

改變測試方法

Run As-->Run Configurations-->(x)=Arguments-->Program arguments裏面填寫數據,然後再點run

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章