Hi! Try at MSDOS command prompt: ipconfig (if you just want to know about your PC's address) or if it is in some java program try InetAddress ad = InetAddress.getByName("localhost"); Hemant [This message has been edited by Hemant KS Sengar (edited April 28, 2001).]
Hi, Use this simple code. import java.net.*; class whoami{ public static void main(String args[]) throws Exception{ InetAddress a = InetAddress.getByName(null); System.out.println(a); } }
The InetAddress .getByName with a paramater of null helps determine the local IP address.