My new laptop (Alienware m17x) throws a java.net.SocketException: Invalid argument: connect
when I run the following basic code:
Server.java:
Your machine seems to have an IPv6 configuration and is preferred by default in Java so try start your server and client with -Djava.net.preferIPv4Stack=true as JVM args:
java -Djava.net.preferIPv4Stack=true Client.main
Also make sure you didn't deny the application network access when Windows' Firewall asked you for permission. If you did, you can change the settings in the control panel.