Class NetworkInterface


  • public class NetworkInterface
    extends Object
    Provide the IP address of the machine on the local network.
    Author:
    Grégory Van den Borre
    • Method Detail

      • getPreferredAddress

        public static String getPreferredAddress()
        Provide the IP address.
        Returns:
        The ip V 4 address, never null.
        Throws:
        IllegalStateException - if an error occurred.