users@glassfish.java.net

Re: FreeBSD glassfish

From: Binod <Binod.Pg_at_Sun.COM>
Date: Thu, 09 Nov 2006 11:45:05 +0530

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());

    }

}