1

i have installed jpcap and add it in library but i have error in this line:

String[] devices = JpcapCaptor.getDeviceList();

i think I added it wrong because it said: Javadoc not found. Either Javadoc documentation for this item does not exist or you have not added specified Javadoc in the Java Platform Manager or the Library Manager.

public static void main(String[] args) throws UnknownHostException {
    // TODO code application logic here
  String[] devices = JpcapCaptor.getDeviceList();
    if(args.length<1){
        System.out.println("Usage: java SentUDP <device index (e.g., 0, 1..)>");
        for(int i=0;i<devices.length;i++)
            System.out.println(i+":"+devices[i].name+"("+devices[i].description+")");
        System.exit(0);
    }
user1796108
  • 11
  • 1
  • 2

1 Answers1

0

Here is a link to the javadoc for the deviceList() method: http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/javadoc/jpcap/JpcapCaptor.html#getDeviceList()

As you can see, it returns an array of NetworkInterface objects, not an array of strings.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216