I have a web application(in tomcat), and I would like to open two clients (client1, client2) on different machines (machine1, machine2). I would like to execute java program on machine2 from client on machine1(client1). Is it possible, If so please suggest me one.
But this is really a bad idea, unless I'm not understanding what you want.
Normally, you have a server running Tomcat (it can be a normal PC, but you need to think of it as a server) and one or more clients.
If I understand you, you want to have one server and two clients, and when Client1 does something, you want to "execute a program' on Client2.
This sounds a lot like a virus or malware. It is bad security. Nothing you do on Client 1 should change what is executing on Client 2. Ever.
You could use AJAX to have Client 1 set a state on the server that is visible to Client2, and triggers some AJAX response. This could appear to work the way you describe. But in reality, the clients were running the AJAX code before you started, and you just returned data.
Fog Creek CoPilot does exactly this. Both client machines log in to a server and one can take over the other. It was written by a couple interns as a summer project (!) Reading about it may give you some ideas.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Sep 16, 2007
Thank you, I wanted same like CoPilot, my application did not require this many features, I would just like to execute a java program. I would read about this now. If anybody knows about it please let me know. Thank you.