Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

executing a java program from web client

 
R lolabhattu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanku
R Lolabhattu
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do anything if you try hard enough.

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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
R lolabhattu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic