How do I return fully qualified address?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Peter_Flynn
Posted On:   Tuesday, April 2, 2002 07:27 AM

Hi, I am wanting to return a fully qualified address back from a request, but receive a much shorter value. For the example, imagine I had a machine called: mymachine.mycompany.com DNS lookups return the full address, and other machines can connect to my machine using the full address. However, on the actual machine I get something shorter. All I get is mymachine How can I get the additional suffix? I'm working on a distributed system so its essential we have the full address. I've tried disabling NetBIOS and everything to resolve this issue. (This is all running on Windows 2000).    More>>

Hi,

I am wanting to return a fully qualified address back from a request, but receive a much shorter value.



For the example, imagine I had a machine called:


mymachine.mycompany.com



DNS lookups return the full address, and other machines can connect to my machine using the full address. However, on the actual machine I get something shorter.



All I get is mymachine



How can I get the additional suffix? I'm working on a distributed system so its essential we have the full address. I've tried disabling NetBIOS and everything to resolve this issue.



(This is all running on Windows 2000).



			
String hostname = InetAddress.getLocalHost().getHostName();
// returned mymachine instead of mymachine.mycompany.com



Can anyone help?


Regards,
Peter    <<Less

Re: How do I return fully qualified address?

Posted By:   Peter_Flynn  
Posted On:   Tuesday, April 2, 2002 08:12 AM

I've just tried InetAddress.getCanonicalAddress() from the JDK 1.4 which returns the domain suffix for most servers apart from my own machine. My machine is still without its suffix. :(



Is there an appropriate way for doing this under JDK 1.3?

Regards,
Peter
About | Sitemap | Contact