Hi
Sorry I didn't get back to you sooner.
Here is the resulting output from the last snippet (which looks
strangely familiar to the problem I am having)
Ok, We got the loopback address
Exception in thread "main" java.net.BindException: Can't assign
requested address
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at tt.main(tt.java:16)
Binod wrote:
> Kenneth Clark wrote:
>
>> I have attached the files, if this is not sufficient let me know
>
>
> Lets see, if we need more :-)
>
> Can we try this small java app? Look like there is some problem
> with loopback address.
>
> import java.net.*;
> import java.nio.channels.*;
>
> public class t {
> public static void main(String[] args) throws Exception {
>
> InetAddress address = InetAddress.getByName(null);
>
> if (address.isLoopbackAddress()) {
> System.out.println("Ok, We got the loopback address");
> } else {
> System.out.println("Oh! getByName(null) returns non-loop
> back address");
> address = null;
> }
>
> ServerSocket s1 = new ServerSocket(0,0,address);
>
> System.out.println("s1 is:" + s1.getLocalPort());
>
> }
>
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>