Viewing An IP Address in Command Prompt
Please support our Windows NT / 2000 / XP / 2003 advertiser: Programming Forums
![]() |
•
•
•
•
Originally Posted by C++
server_crash, thanx but i already know that. I wanted 2 make a program that tells u the ip address of the inputted domain name.
thanx anyway.
You might also check out the "nslookup" command.
"May the Wombat of Happiness snuffle through your underbrush."
- Ancient Aborigine blessing
Please do not contact me by email or PM for help. We're all volunteers here, and only have so much free time to dedicate to our efforts.
However, if I've been working on a thread with you already, and seem to have "forgotten" your thread, please do send me a message. I try not to let things slip through the cracks, but it does happen sometimes.
- Ancient Aborigine blessing
Please do not contact me by email or PM for help. We're all volunteers here, and only have so much free time to dedicate to our efforts.
However, if I've been working on a thread with you already, and seem to have "forgotten" your thread, please do send me a message. I try not to let things slip through the cracks, but it does happen sometimes.
•
•
Posts: 2,105
Reputation:
Solved Threads: 18
•
•
•
•
Originally Posted by C++
thanx. one more question. is there a way to return the ip address to a java/c++ program?
This is how you can grab the client ip address:
InetAddress thisIp =
InetAddress.getLocalHost();
System.out.println("IP:"+thisIp.getHostAddress());Remember to include that in a try catch clause, as that code could potentially cause an exception.
Also, writting a simple servlet would be easier:
String IP = req.getRemoteAddr();
![]() |
Similar Threads
Other Threads in the Windows NT / 2000 / XP / 2003 Forum
- Command Prompt (Windows Software)
- Change background color of command prompt (Windows tips 'n' tweaks)
Other Threads in the Windows NT / 2000 / XP / 2003 Forum
- Previous Thread: How to enable auto logon function
- Next Thread: I can connect to the net but cannot open sites or messengers
•
•
•
•
Views: 10014 | Replies: 7 | Currently Viewing: 1 (0 members and 1 guests)






Linear Mode