getLocalHost() Always Returns Loopback?
Ryan Sommers
ryans at gamersimpact.com
Wed Apr 7 08:57:04 PDT 2004
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
ryans at gamersimpact.com
ICQ: 1019590
AIM/MSN: leadZERO
-= http://www.gamersimpact.com =-
More information about the freebsd-java
mailing list