InetAddress.getLocalHost()

Mohan Embar gnustuff@thisiscool.com
Sun Jun 22 13:19:00 GMT 2003


Hi Erik,
Erik> So, I can query this executable and finally get hold of the local host name instead
Erik> of going through the convoluted, tribal ritual of invoking
Erik> "InetAddress.getLocalHost().getHostName()"; which eventually gives birth to the very
Erik> correct but absolutely useless answers of "127.0.0.1" or"localhost"; all of which was
Erik> instituted in the JDK in order to participate in the so-called SecurityManager
Erik> circus, which happens to be everthing but secure.
Erik> (By the way, in what circumstances could such answers actually be useful? I am
Erik> puzzled...)
Andrew> Out of interest, why do you want to know the local IP address in any
Andrew> case?
I am also interested in your answer to Andrew's question.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /