This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get IP address in linux

 
shiva kumar nanda
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on Linux.
I have a problem of getting the IP Address.
Can any one help me in getting the IP Address.
And my IP Address changes day by day.

Using InetAddress class i am able to get the IP Address on Windows, but this is failing on Linux.

Thank You
 
Arun Bommannavar
Ranch Hand
Posts: 53
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you getting when you do InetAddress.getLocalHost()?.
what does your /etc/hosts have?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic