Why i am gettng IP Addres as 127.0.0.1
This is my sample program for what i am using for getting the IP Address
package com;
import java.net.InetAddress;
import org.apache.log4j.Logger;
public class Test {
private static final Logger logger = Logger.getLogger(Test.class);
public static void main(String args[]) throws Exception {
String ips = InetAddress.getLocalHost().getHostAddress().trim();
System.out.println(ips);
}
}