/* * testThree.java * * Created on 21 June 2007, 20:50 * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package learning; import jpcap.JpcapCaptor; import jpcap.NetworkInterface; /** * * @author Mike */ public class testThree { /** Creates a new instance of testThree */ public testThree() { NetworkInterface[] devices = JpcapCaptor.getDeviceList(); int index=0; // set index of the interface that you want to open. //Open an interface with openDevice(NetworkInterface intrface, int snaplen, boolean promics, int to_ms) JpcapCaptor captor=JpcapCaptor.openDevice(devices[index], 65535, false, 20); } } //debug init: deps-jar: Compiling 2 source files to C:\Documents and Settings\Mike\Learning\build\classes C:\Documents and Settings\Mike\Learning\src\learning\testThree.java:27: unreported exception java.io.IOException; must be caught or declared to be thrown JpcapCaptor captor=JpcapCaptor.openDevice(devices[index], 65535, false, 20); 1 error BUILD FAILED (total time: 0 seconds)