java - networkinterface in linux undetected -
i have tried next code :
networkinterface[] devices = jpcapcaptor.getdevicelist(); jpcapcaptor jpcap = null; system.out.print(devices.length); (int a=0;a<devices.length;a++) { seek { jpcap = jpcapcaptor.opendevice(devices[a], 2000, true, 20); jpcap.looppacket(-1, new arp_spoofing());//for capture packet } grab (ioexception ex) { logger.getlogger(receiver2.class.getname()).log(level.severe, null, ex); } }
in same code.when run in windows,i interface in linux did'nt interface.. there is'nt syntax error..
i had same problem when run in ubuntu 11.10 , netbeans. when seek run jar file using terminal (with sudo permissions) worked. think issue permissions in linux.
try running .jar file in terminal sudo java -jar yourjarfile.jar
java linux windows network-programming network-interface
No comments:
Post a Comment