title: Java getNetworkInterfaces() not working on Debian 9
body: <p>The following java code used to return all my network interfaces.</p>
  
  <pre><code>public class InterfaceTest {
      public static void main(String[] args) throws SocketException {
          Enumeration&lt;NetworkInterface&gt; networkInterfaces = NetworkInterface.getNetworkInterfaces();
          int i=0;
          while (networkInterfaces.hasMoreElements()) {
              NetworkInterface nextElement = networkInterfaces.nextElement();
              System.out.println(nextElement.getName());
              i++;
          }
          System.out.println(i+" interfaces found!");
      }    
  }
  </code></pre>
  
  <p>Display something like:</p>
  
  <pre><code>lo
  eth0
  wlan0
  waln1
  3 interfaces found!
  </code></pre>
  
  <p>But now it only returns</p>
  
  <pre><code>wired
  lo
  2 interfaces found!
  </code></pre>
  
  <p>Note: I renamed my network card to wired, by specifying it on /etc/udev/rules.d/70-persistent-net.rules (replacing the mac address by the real one)</p>
  
  <pre><code>SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="**00:00:00:00:00:00**", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="wired"
  </code></pre>
  
  <p>However, I also have two usb WiFi dongles which I can see when I type <strong>ifconfig -a</strong>.</p>
  
  <p>So, what could be causing java not to see the other network interfaces (two USB WiFi dongles)?</p>
  
  <p>Thanks in advance for any help.</p>