When I run the Server, I enter a random port number, let's say "1111" (tried this with a variety of ports). I get "Server is running." Then I run the Client and for server address, I enter "localhost" (also tried with IP directly) and for port I enter "1111". Then I get back "An error occurred while working with the client." And when I look at the server side I see: "A connection has been established with /127.0.0.1... An error occurred while communicating with the remote address. Connection with /127.0.0.1... closed." I can track it to when it's in the constructor for Connection and it's getting the ObjectInputStream. Then I think it's throwing and exception somewhere in there but I can't follow it. Any idea what is going wrong? I can't post all my code here since it's the solution to a task but I can PM you my code if you can help.
Code passes verification but program doesn't run correctly
You must be signed in to leave a comment
24 February 2022, 21:58
How can I start several clients? Try it in main method at Client class by creating new Client and the calling run() method on this object. But only one client is working.
4 June 2019, 18:46
have u tried 8080 port?
5 June 2019, 14:48
Yup, no dice.