-2

I made an applet with a chess game but now I want to be able to play against somebody else on another computer. I found alot about serverlets but I don't have a server to run it on.

Does anybody knows how I send data from an applet to another instance of that applet on an other computer?

Aenterprise
  • 19
  • 1
  • 5
  • 1
    This is a very broad question. I would suggest you do a little research on the subject and try something according to what you find, and *then* ask here if you encounter a *specific* problem. – Alexis Leclerc Feb 25 '14 at 15:45
  • that's the problem, the only thing i find are using those serverlets – Aenterprise Feb 25 '14 at 15:54
  • Well, you don't need a server or another machine to develop a multiplayer application. You can have 3 JVMs on your local machine that act respectively as Player 1, Server and Player 2. – Alexis Leclerc Feb 25 '14 at 15:59
  • Take a look at [this question](http://stackoverflow.com/questions/10942427/how-to-have-2-jvms-talk-to-one-another). Sockets are a good way to go if you want to develop and test locally (localhost) but want it functional on separate machines. – Alexis Leclerc Feb 25 '14 at 16:03
  • that link leads to the site example.com not to a question – Aenterprise Feb 25 '14 at 16:04
  • Oh sorry, forgot to add the actual link. Fixed it ;) – Alexis Leclerc Feb 25 '14 at 16:05

1 Answers1

0

You should strongly consider using a server (e.g. a Google app engine server, it's free). Otherwise you will have trouble with connecting people with each other (finding the IP of the other machine, and going though firewall / NATs will be a big issue).

Nicolas Defranoux
  • 2,646
  • 1
  • 10
  • 13
  • and how does that works? i just created a project there but i don't find how i would be able to run a serverlet – Aenterprise Feb 25 '14 at 15:55
  • You can have a look at https://developers.google.com/appengine/docs/java/channel/ You'll need to run some code on the server and some code on the clients as well, this example uses javascript clients but you should be able to use java clients as well. – Nicolas Defranoux Feb 25 '14 at 15:57