hiho,
i intend to develop just a litte network application, something like a chat. so i downloaded xampp for windows and installed it (also as service), mysql included. well, i started the apache (and mysql) as service and just wrote the short line in java:
try {
Socket sock = new Socket("127.0.0.1", 21);
System.out.println("connection established");
} catch ( UnknownHostException e ) {
System.out.println("Can't find host.");
} catch ( IOException e ) {
System.out.println("Error connecting to host. " + e.toString());
}
but directly i got the answer:
Error connecting to host. java.net.ConnectException: Connection refused: connect
the server is runnin'. the localhost is accessible on the browser.
did i forgot something? any ideas?