• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to know the DNS name or IP address of server with code?

 
HiBob Chu
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends:
When start a client, the DNS name or the IP
address of server is needed. (and I think they are just the hostname for RMI, is it right?), if the server can display it's DNS name or IP address after it start, the testing of client will be convenience.
Is there any method in Java can display the DNS name or IP address of the machine which the application is running on?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can, but my advice would be not to worry about this. You can assume that the assessor knows his own machine names.
- Peter
 
HiBob Chu
Ranch Hand
Posts: 86
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, thank you.
regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic