// Demonstrate InetAddress.
public class InetAddressTest
public static void main(String args) throws UnknownHostException
InetAddress Address = InetAddress.getLocalHost();
InetAddress SW = InetAddress.getAllByName("www.nba.com");
for(int i = 0; i<SW.length; 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..
Set Class Path.
Originally Posted by lanpan
Can't you see the difference now? Your classpath is set to E and your classes are actually located in F. Well, i will recommend you to go through Lesson: Common Problems (and Their Solutions) (The Java™ Tutorials > Getting Started)