Class SystemUtil


  • public final class SystemUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getServerIPv4()
      Returns server IP address (v4 or v6) bound to local NIC.
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getServerIPv4

        public static java.lang.String getServerIPv4()
        Returns server IP address (v4 or v6) bound to local NIC. If multiple NICs are present, choose 'eth0' or 'en0' or any one with name ending with 0. If non found, take first on the list that is not localhost. If no NIC present (relevant only for desktop deployments), return loopback address.
      • main

        public static void main​(java.lang.String[] args)