String ip = "";
InetAddress inet = null;
try {
inet = InetAddress.getLocalHost();
System.out.println(inet.getHostAddress());
} catch(Exception e) {
e.printStackTrace();
}
String ip = "";
InetAddress inet = null;
try {
inet = InetAddress.getLocalHost();
System.out.println(inet.getHostAddress());
} catch(Exception e) {
e.printStackTrace();
}