java -classpath TCPServer.java runs with no problemimport java.net.*;
import java.io.*;
public class IPFinder
{
public static void main(string[] args) throws IOException
{
String host;
BufferedReader input =
new BufferedReader( new InputStreamReader(System.in));
System.out.println("\nEnter host name: ");
host = input.readLine();
try
{
InetAddress address=
InetAddress.getByName(host);
System.out.pringln("IP Address: " + address);
}
catch (UnknownHostException e)
{
System.out.println("Could not find " + host);
}
}
}
java TCPServer replies
"Exception in thread "main" java.lang.NoClassDefFoundError: TCPServer
I am sure I'm compiling this wrong... I have the j2sdk-1_3_1_15-windows-i586.exe installed and I'm just copying off of handouts... can someone tell me what I'm doing wrong?