getLocalHost() Always Returns Loopback?

getLocalHost() Always Returns Loopback?

Post by ryan » Fri, 09 Apr 2004 00:57:16


I'm having a lot of difficulty getting InetAddress.getLocalHost() to
return anything besides the loopback address. After hours of scouring
google I've found this is a common problem. Most of the solutions have to
deal with the java.policy file.

First off... Everything says to put the policy file in your home
directory; never works. Any ideas? I've gottne past this by running with
the arguments "-Djava.security.manager
-Djava.security.policy==/usr/home/.../java.policy".

My java.policy file contains:
grant {
permission java.net.SocketPermission "*:1024-65535",
"connect,accept,listen,resolve";
permission java.security.AllPermission;
};

Any ideas how I can get any of the other IP Addresses returned? I'm
attempting to run the PAST java code (search google for PAST AND Storage).

Any hints would be greatly appreciated.

--
Ryan "leadZERO" Sommers
Gamer's Impact President
XXXX@XXXXX.COM
ICQ: 1019590
AIM/MSN: leadZERO

-= http://www.yqcomputer.com/ =-


_______________________________________________
XXXX@XXXXX.COM mailing list
http://www.yqcomputer.com/
To unsubscribe, send any mail to " XXXX@XXXXX.COM "
 
 
 

getLocalHost() Always Returns Loopback?

Post by chris-free » Fri, 09 Apr 2004 01:50:03

On Wed, Apr 07, 2004 at 09:56:39AM -0600, Ryan Sommers said:

additional specific data points that don't solve your problem:

Windows 2000, Weblogic JDK 1.3.1_03: returns non-loopback
Linux (kernel 2.6), JDK 1.4.2_01: returns non-loopback
FreeBSD -stable from 8 Jan 2004, native JDK 1.3.1-p9: returns loopback
FreeBSD -stable from 8 Jan 2004, linux JDK 1.3.1_10: returns loopback

chris

-------------------------------
Chris Doherty

"I think," said Christopher Robin, "that we ought to eat
all our provisions now, so we won't have so much to carry."
-- A. A. Milne
-------------------------------
_______________________________________________
XXXX@XXXXX.COM mailing list
http://www.yqcomputer.com/
To unsubscribe, send any mail to " XXXX@XXXXX.COM "