Close
jGuru Forums
Posted By: Blue_Milk Posted On: Wednesday, July 31, 2002 08:54 AM
when i try to use this segment of code... InetAddress inet = new InetAddress(); String ip = inet.getHostName(); it returns an "InetAddress() is not public in java.net.InetAddress; cannot be accessed from outside package". what is the problem with the code. anyway.. is this the correct way of determining the IP address in which this java file is currently running in?
InetAddress inet = new InetAddress(); String ip = inet.getHostName();
Re: InetAddress.getHostName() question
Posted By: Blue_Milk Posted On: Wednesday, July 31, 2002 09:01 AM