Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I've finally managed to get it working without using a wrapper for java. It has to do with filesystem capabilities in Linux. To let java list and select network interfaces, as well as analyse and ...
Answer
#1: Initial revision
I've finally managed to get it working without using a wrapper for `java`. It has to do with filesystem capabilities in Linux. To let `java` list and select network interfaces, as well as analyse and capture packets, go to the directory where the executable the IDE uses is (for example, `/usr/lib/jvm/java-8-oracle/bin`; in Eclipse you can get it by seeing the console titlebar) and run the following command before doing so with your project: sudo setcap cap_net_raw,cap_net_admin=eip java Then run your project. Once you have tested your project, run the following command to leave things as they were before: sudo setcap -r java You can see if capabilities have been applied/removed by running: getcap java See [this](http://www.tcpdump.org/manpages/pcap.3pcap.html) for more information regarding Linux behaviour when opening interfaces, and [here](http://peternixon.net/news/2012/01/28/configure-tcpdump-work-non-root-user-opensuse-using-file-system-capabilities/) is a complete procedure in case you have to configure something.