Here you can find the source of getWinLocalIp()
public static InetAddress getWinLocalIp() throws UnknownHostException
//package com.java2s; //License from project: Apache License import java.net.InetAddress; import java.net.UnknownHostException; public class Main { public static InetAddress getWinLocalIp() throws UnknownHostException { InetAddress inet = InetAddress.getLocalHost(); return inet; }/*from ww w . j av a 2s . c om*/ }