public static String getLocalHostAddress ( ) throws UnknownHostException , SocketException { try { return getLocalHost ( ) . getHostAddress ( ) ; } catch ( Exception e ) { Scope . getCurrentScope ( ) . getLog ( NetUtil . class ) . fine ( LogType . LOG , "Error getting hostname" , e ) ; return "unknown" ; } }
Returns Local Host IP Address