I can磘 get the IP address from InetAddress getHostAddress() method. Why ?

Hi all,

Here is my code:

ssc = ServerSocketChannel.open();

ssc.socket().bind(new InetSocketAddress(4000));

ssc.configureBlocking(false);

When I do:

System.out.println(ssc.socket().getInetAddress().getHostAddress());

It returns: 0.0.0.0

What should I do to obtain IP address from OS correcly ?

Thanks.

[428 byte] By [aboaventuraa] at [2007-11-27 1:39:06]
# 1
Sorry friends.A more refined search brought me the solution. It磗 here: http://forum.java.sun.com/thread.jspa?forumID=536&threadID=753190
aboaventuraa at 2007-7-12 0:51:44 > top of Java-index,Core,Core APIs...