Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Sockets and Internet Protocols
Search Coderanch
Advanced search
Google search
Register / Login
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Devaka Cooray
Tim Cooke
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Saloon Keepers:
Piet Souris
Bartenders:
Forum:
Sockets and Internet Protocols
How to get DNS name and IP Address with Java code
SP Nam
Ranch Hand
Posts: 41
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How can I get my DNS servername and IPAddress, by just running a java program from command prompt, code help please
Vinod Chandana
Ranch Hand
Posts: 59
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Try InetAddress.getLocalHost().getHostName() and InetAddress.getLocalHost().getHostAddress(). This will give u both name and the address of the localhost. Hope this helps. If not give me a message.
Vinod.
Ernest Friedman-Hill
author and iconoclast
Posts: 24208
47
I like...
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'm closing this thread, as it's a duplicate of
this one,
where the question has already been answered. Please post followups there.
[Jess in Action]
[AskingGoodQuestions]
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
DNS Verification
Server Instructions...
How to make DNS
Enum and DNS for VPIM (Voice Profile for Internet Mail)
iam getting java.rmi.ConnectException
More...