title: Why is getDeviceList() method in jpcap.JpcapCaptor class native in JEthereal?
body: <p>I recently downloaded the <code>JEthereal.jar</code> file to capture packet traffic on my internet connection through <code>JEthereal</code> and also to study it. It reads the packets from a <code>.pcap</code> file just fine but on trying to capture packets it gave me a message  that: </p>
  
  <blockquote>
    <p>"No device found. This probably means that you installed JPcap but not
    libpcap / WinPcap.Please follow the instructions on the website to
    install it. It takes about 15 seconds and is well worth it."</p>
  </blockquote>
  
  <p>So I downloaded its source code and opened it in Eclipse since I had already installed <code>WinPcap</code>.</p>
  
  <p>On going through the code I came to the part where network devices are supposed to be discovered. The static method <code>getDeviceList()</code> from the <code>JpcapCaptor</code> class in the <code>jpcap</code> package which should return an array of network devices of type <code>NetworkInterface</code>. The following is its declaration given on the internet:</p>
  
  <pre><code>public static NetworkInterface[] getDeviceList()
  </code></pre>
  
  <p>However, in the source code that I have downloaded the method is left without a body and its been declared <code>native</code> i.e.</p>
  
  <pre><code>public static native NetworkInterface[] getDeviceList();
  </code></pre>
  
  <p>What should I do now to identify my devices? On searching on the net and on this portal I came to know that a <code>jpcap.dll</code> file should be present in my system32 folder (I am using Windows7) and I should install <code>WinPcap</code> for that. I had already installed <code>WinPcap</code> and there is no <code>jpcap.dll</code> file in the system32 folder. Also, i suppose i should add system32 to my PATH variable, i haven't done that yet since there is no <code>jpcap.dll</code> there.</p>
  
  <p>Thanx in advance!!</p>