This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: InetAddress.getLocalHost()


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/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]