我目前正在運行和開發遊戲服務器,但事情是我不能在eclipse上運行它,但我可以運行服務器與run.bat 我「M收到錯誤:異常在線程「主」java.lang.ArrayIndexOutOfBoundsException:3
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at com.rs.ServerLauncher.main(ServerLauncher.java:75)
相關代碼
public static void main(String[] args) throws Exception {
if (args.length < 3) {
System.out.println("USE: guimode(boolean) debug(boolean) hosted(boolean) port(integer)");
return;
}
Settings.ECONOMY_MODE = Boolean.parseBoolean(args[2]);
Settings.DEBUG = Boolean.parseBoolean(args[1]);
Settings.SERVER_PORT = Integer.parseInt(args[3]);
.....
.....
.....
完整代碼-My ServerLauncher類:http://pastebin.com/k1XZbqva
在此先感謝。
在您的問題中發佈代碼,以便有類似問題的人可以找到此帖子。 – Pshemo 2015-04-02 10:31:45
「你的問題發佈在你的問題」是什麼意思? 我說我不能發佈全班,因爲它不會讓我。 我提供了整個班級的pastebin鏈接 – Mikk 2015-04-02 10:32:32
你應該發佈一個[MCVE](http://stackoverflow.com/help/mcve) – Jens 2015-04-02 10:33:19