The Artima Developer Community
Sponsored Link

Java Answers Forum
Getting IP address of Local Host

1 reply on 1 page. Most recent reply: Feb 22, 2003 5:32 PM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Kent Frazier

Posts: 2
Nickname: ksf
Registered: Feb, 2003

Getting IP address of Local Host Posted: Feb 21, 2003 12:26 PM
Reply to this message Reply
Advertisement
I've been using the following java call to obtain the IP address of my local host.

InetAddress.getLocalHost().getHostAddress()

This program ran fine on a SUN Solaris 5.6 system, but we recently upgraded to Solaris 8 and I find that the same program is now returning 127.0.0.1 when I call it. Anybody else run into this problem?


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: Getting IP address of Local Host Posted: Feb 22, 2003 5:32 PM
Reply to this message Reply
127.0.0.1 is the default local IP address when not connected to the internet.

Try connecting to the internet and then run it again.

Flat View: This topic has 1 reply on 1 page
Topic: Java Mail from iPlanet Previous Topic   Next Topic Topic: assignment help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use