Note that there are some explanatory texts on larger screens.

plurals
  1. POProgramming with Java jpcap on Eclipse Indigo IDE on Windows 7 platform
    primarykey
    data
    text
    <p>I'm programming in Java and new to jpcap. I have installed Jpcap for Microsoft Windows. My PC runs on Windows 7 Platform. I have an Eclipse Indigo IDE. When i created a new Java Project using the Eclipse Indigo IDE, i created a class with a main method and i copied and pasted the code from the jpcap tutorial. </p> <pre><code>package PacketCapturing; import jpcap.*; import jpcap.packet.*; public class NetworkInterfaceList { public static void main(String args[]){ //Obtain the list of network interfaces NetworkInterface[] devices = JpcapCaptor.getDeviceList(); //for each network interface for (int i = 0; i &lt; devices.length; i++) { //print out its name and description System.out.println(i+": "+devices[i].name + "(" + devices[i].description+")"); //print out its datalink name and description System.out.println(" datalink: "+devices[i].datalink_name + "(" + devices[i].datalink_description+")"); //print out its MAC address System.out.print(" MAC address:"); for (byte b : devices[i].mac_address) System.out.print(Integer.toHexString(b&amp;0xff) + ":"); System.out.println(); //print out its IP address, subnet mask and broadcast address for (NetworkInterfaceAddress a : devices[i].addresses) System.out.println(" address:"+a.address + " " + a.subnet + " "+ a.broadcast); } } </code></pre> <p>On the Java Code Editor for Eclipse Indigo IDE, i saw red lines marked for the NetworkInterface class,the NetworkInterface device, a objects and its attribute variables.</p> <p>When i mouse over the red markers, i saw this error message that says : </p> <pre><code>Access restriction: The type NetworkInterface is not accessible due to restriction on required library C:\Windows\Sun\Java\lib\ext\jpcap.jar </code></pre> <p>When i ran the Java program,there was no compilation error thrown and the Java console was able to show the output correctly. Why is that so?? Is there any way to remove the red markers on the Java Editor whenever i call the jpcap library on the Eclipse Indigo IDE? Is it because i didn't install winpcap for windows?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload