14 Years
Discussion Span
Last Post by peter_budo

what do you mean for example i have a java script on one of my sites that tells the user visiting the site what there ip adress is. or are you trying to find all ur ip info cuz then you dont need a java program just goto run<cmd< type ipconfig all/. Or are u trying to build a java app that lets someone find ip info.

Tip:next time make your question clearer and make sure it makes sense


I tell you the way round ...

Process p = Runtime.Runtime().exec("ipconfig");

or just type another command for finding what computers are connected to your computer ( see net commands )

if you have linux or something .... write the commands over ipconfig.


The best way to obtain IP address is via the JDK's InetAddress

This returns InetAddress which has many goodies you can play around with.

For example, You can do things like reverse domain name loook ups on arbitrary ipaddresses... or ip addresses from hostnames.

By the way Nice Runtime Trick nanosani... it doesn't work if the host is running a secure classloader though... or another OS withouth ipconfig for that matter. =\


How to find the class of an ip address? please provide me a code in java or c++.......

Please read previous replies and in the future do not ask question in old thread that already have answer to it

If you have more specific questions then demanding code you are more then welcome to create new thread. As of now thread is closed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.