Enumeration addrs = ni.getInetAddresses();
while (addrs.hasMoreElements()) { InetAddress addr = (InetAddress) addrs.nextElement(); System.out.println(" " + addr.getHostAddress());
	public static Vector getIP() {		Enumeration ifaces;		Vector addresses = new Vector();		try {			ifaces = NetworkInterface.getNetworkInterfaces();			while (ifaces.hasMoreElements()) {				NetworkInterface ni = (NetworkInterface) ifaces.nextElement();				System.out.println(ni.getName() + ":");				Enumeration addrs = ni.getInetAddresses();				while (addrs.hasMoreElements()) {					InetAddress addr = (InetAddress) addrs.nextElement();					System.out.println(" " + addr.getHostAddress());					addresses.add(addr);				}			}		} catch (SocketException e) {			e.printStackTrace();		}		return addresses;	}