How to get the local host address in gwt
Hi All,
I need to get the localhost ip address in my GWT code.
Please guide me how I can get this.
I've tried the below but it giving error "java.net.InetAddress can not
be found in source packages. Check the inheritance chain from your
module"
try{
InetAddress address = InetAddress.getLocalHost();
String ip = address.getHostAddress();
//Window.alert("IP address "+ip);
} catch (Exception e)
{
// e.printStackTrace();
}
Please guide how we can get the host address.
Regards,
Darpan Kumar
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home