--- Timothy Stack <[EMAIL PROTECTED]> wrote: > > On Sun, Feb 23, 2003 at 02:46:19PM -0700, Timothy > Stack wrote: > > > On Sunday, February 23, 2003, at 11:48 AM, > Matthew Toseland wrote: > > > >While trying to get freenet working on Kaffe, I > discovered a side > > > >issue... we use the attached code to detect the > local internet IP > > > >address. Basically, we open a datagram socket > to the A-root nameserver > > > >and call getLocalAddress(). > > > why not just use InetAddress.getLocalHost()? > Or,=20 > > Because it doesn't do what we want, at least in > the Sun JVM? > > Care to elaborate?
I think they do that because Sun's JDK has a bug and caches InetAddresses forever, leading to problems when the IP address of the localhost changes (expired DHCP lease ?). Did I guess right? > > > useNetworkInterface.getNetworkInterfaces() and > handle the=20 > > > NoClassDefFoundError with this method. > > Hmmmmm... this is supported by Kaffe? We'd have to > have a fallback for > > pre-1.4 JVMs, yeah... > > I think its in CVS now. Yes. Merged in from JanosVM 1.0. cheers, dalibor topic __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ _______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe