original source is http://www.instructables.com/id/Creating-a-Chat-Server-Using-Java/
I tested that code, but that doesnot work. I rewrite many part of that.
You can use your own lisk.
I feel weird about class named ServerThread
is in client
package (also ClientThread
is in server
package).
I'm not native English speaker. Correct my English welcome.
Sorry for procrastinate.
Some of the questions are about how to execute it, so let me explain.
I was also interested in the question of running it in Eclipse, so I tried it, even though I don't usually use Eclipse.
I only explain with Eclipse 2020.
Of course, you don't need to use Eclipse to run these programs.
note: This answer is a machine translation, so the sentence may be unnatural. I lightly checked the English text, though.
To run these programs, do like following:
Run a server first.
right click inside ChatServer.java source code
Choose Run > Java Application
Then run a client.
Perform the same operation in Client.js.
You can see the runner pain like below:
note that: This is not current running list. This is a list of execution setting.
You can switch the console by clicking icon.