aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes How to know the DNS name or IP address of server with code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "How to know the DNS name or IP address of server with code?" Watch "How to know the DNS name or IP address of server with code?" New topic
Author

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

HiBob Chu
Ranch Hand

Joined: Aug 12, 2002
Posts: 86
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

Joined: Apr 20, 2000
Posts: 3252
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

Joined: Aug 12, 2002
Posts: 86
OK, thank you.
regards.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to know the DNS name or IP address of server with code?
 
Similar Threads
shift booking app
iam getting java.rmi.ConnectException
Url rewriting
error while connecting to webservices