Call an "WIN EXE" from a remote app running on LINUX

Hi all.

My question is not "strictly java", but I think it can be interesting anyway...

I have a web app, that I can deploy both on win and on linux.

From this application, I have to make a remote window executable start.

If the web app is deployed on win, I simply call

Runtime.getRuntime().exec("REMOTE_WIN_MACHINE/myexe.exe");

but how can I accomplish the same if the web app is running on a linux platform?

Shall I write a script and call it by

Runtime.getRuntime().exec()

?

Are there any additional components I have to install on one or both of the two machines?

Any help will be very appreciated!

[703 byte] By [robicha] at [2007-10-2 12:15:55]
# 1

I reply to myself, if there's someone interested....

So far, I' ve found 3 ways to approach this issue:

1) OpenSSH:

Install an OpenSSH server on WIN side.

On LINUX side, write a script that opens an OpenSSH transaction and then call the executable; this script is what I call from Runtime.getRuntime().exec()

This way, the executable is executed on WIN.

2) Wine (Windows emulator for LINUX)

Install WINE on LINUX side.

Make the executable reachable from LINUX to WIN side (copy/paste or mount the folder) and call Runtime.getRuntime.exec("wine MYEXE.EXE")

.

This way, the executable is executed on LINUX (you need to make all DLLs reachable)

3) RMI

Write a RMI server as "exe invoker" and deploy it on WIN side.

Then, replace the portion of code that calls the executable with an RMI client that invoke the RMI server.

This way, the executable is executed on WIN.

Finally, I chose this third way.

robicha at 2007-7-13 9:01:36 > top of Java-index,Enterprise & Remote Computing,AVK Portability...
# 2

> I reply to myself, if there's someone interested....

>

> So far, I' ve found 3 ways to approach this issue:

>

>

> Finally, I chose this third way.

Sounds like the most sensible of the three options you mentioned earlier.

Cheers

sahooa at 2007-7-13 9:01:36 > top of Java-index,Enterprise & Remote Computing,AVK Portability...
# 3
What do you mean with "most sensible" ?
robicha at 2007-7-13 9:01:36 > top of Java-index,Enterprise & Remote Computing,AVK Portability...
# 4
>> Sounds like the most sensible of the three options you mentioned earlier.> What do you mean with "most sensible" ?I would guess "the option that makes most sense".
tschodta at 2007-7-13 9:01:36 > top of Java-index,Enterprise & Remote Computing,AVK Portability...
# 5

> >> Sounds like the most sensible of the three options

> you mentioned earlier.

> > What do you mean with "most sensible" ?

>

> I would guess "the option that makes most sense".

True. Thanks for clarifying on my behalf. Sorry if I was not clear in my earlier response.

regards.

sahooa at 2007-7-13 9:01:36 > top of Java-index,Enterprise & Remote Computing,AVK Portability...