Originally Posted by
lanpan
// Demonstrate InetAddress.
import java.net.*;
public class InetAddressTest
{
public static void main(String args[]) throws UnknownHostException
{
InetAddress Address = InetAddress.getLocalHost();
System.out.println(Address);
InetAddress SW[] = InetAddress.getAllByName("www.nba.com");
for(int i = 0; i<SW.length; i++)
System.out.println(SW[i]);
}
}
//I typed this program in eclipse on my win 7 pc and when i tried to run got error message(its alert box with "Java Virtual Machine Launcher"as title of alert box) : "could not find the main class: InetAddressTest. Program will exit "
// please help me , what i have to do to run the program..