On Tue, Nov 27, 2001 at 03:18:55PM +0000, Timm Murray wrote:
> > On Mon, Nov 26, 2001 at 07:01:46PM +0100, Jan-Thomas Czornack wrote:
> > > String hostname = InetAddress.getLocalHost().getHostName();
> > > InetAddress[] ips = InetAddress.getAllByName(hostname);
> > > 
> > > I used that long time ago, I hope it does what I think it should do...
> > > (return some ip's, including the wanted one)
> > 
> > Yeah, it works on my computer, but not on everybody's.  I'm not sure
> > why.
> 
> I tried this last night on my system; it gave the localhost address but not 
> the address for my ethernet card (which is in the class C private address 
> space).  It could be that it ignores private addresses (which would be dumb), 
> or it's something VM specific (I'm running IBM 1.3).

I have tried it on a number of PCs and JVMs, and it simply does not work
in a predictable manner. I think this simply goes beyond what can be
achieved in a platform independently.

-- 

Oskar Sandberg
oskar at freenetproject.org

_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to