这是我一个没写完的程序,但遇到了这么个错误,非常郁闷,望高手不吝赐教Exception in thread "Thread-2" java.lang.ArrayIndexOutOfBoundsException: 2 at MainFrame.initial(MainFrame.java:145) at MainFrame$2.run(MainFrame.java:202) at java.lang.Thread.run(Unknown Source)public void initial() throws IOException{ NetworkInterface[] devices=JpcapCaptor.getDeviceList(); int index=1; JpcapCaptor captor=JpcapCaptor.openDevice(devices[index],65535, true,20); PacketReceiver handler; handler=new PacketReceiver(){ public void receivePacket(Packet packet) { //System.out.println(packet);dealPacket(packet); } };