How two applets can talk to each other

Sorry for bothering u guys but do not know how to solve the problem … :-/

That’s the question: how can two applets talk to each other. The two applets are on different clients, I have a server and the clients have an open socket with the server with whom they talk. There is a different thread for every client.

BUT NOW … how can the server send information arriving from one applet to the other ? ???

TIA for any reply.

just take the InputStream from 1 client, and feed it to the OutputStream to the other client (and vice-versa ofcourse)

Incidentally, on the Server you don’t need 1 Thread for each client. It realy depends on what your doing.

Thx for the answer …

When I try to connect to the server, which is launched from the same PC (localhost) and is listening for incoming connections I got the folloqing error … do u have any clou? :o

java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at java.security.AccessController.checkPermission(AccessController.java:399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkExit(SecurityManager.java:765)
at java.lang.Runtime.exit(Runtime.java:91)
at java.lang.System.exit(System.java:701)
at MoveWatcher.run(MoveWatcher.java:87)

I’d have to see your setup to know what was wrong.

I have Apache running on my machine; which is hosting the Applet. Then have the Server also running on my machine.
I can say for sure that definitly works :slight_smile: