Dmitry
Dmitry

Reputation: 41

Error package jpcap does not exist

Error:(2, 17) java: package jpcap.net does not exist I added the library file jnetpcap.jar, but the error does not disappear. Compiler intellij idea IDE. Lines

import jpcap.net.JpcapCaptor;

import jpcap.NetworkInterface;

Are red.

  import java.net.NetworkInterface;
    import jpcap.net.JpcapCaptor;
        import jpcap.NetworkInterface;
       public class Main
  {
        jpcap install;
    static NetworkInterface[] array ;
  public static void main (String[] args)
    {
        array = JpcapCaptor.getDeviceList();
        for (int i=1;  i<array.length ; i++)
      {
            System.out.println(i+" -> " + array[i].description);
        }
    }
}

Upvotes: 0

Views: 691

Answers (1)

Dirar Houimli
Dirar Houimli

Reputation: 61

You should add jpcap.dll file to your "system32" folder.

Upvotes: 0

Related Questions