Remote script execution.

Hello.

I would like to know how to run a script on a remote Linux machine. Can I do this without caring where the local JVM is running?

I haven't done this before, and have searched various places for a concise answer. I have not been successful. Will something like the following work: Runtime.exec("remote.machine\remote.script.sh");. I have also noticed that my searches seem to lead me to discussions of Java RMI, so in thinking RMI has something to say about what I'm doing, I have posted my question here.

Background: I have a java application (a web service in fact) that needs to get information from a back-end system to do its job. It needs to invoke a script that's running on a remote host where the coveted business system resides.

The Runtime.exec() method appears only to run processes on local machines. From the research I have done, the usual fudge here is to know the operating system of the local machine so you might be able to use its remote process execution facilities. However, I don't want to know anything about the local OS, because it could be different between development, testing, and production. I know that the remote OS is Linux.

Is there any way I can get a process to run on a remote machine without having to know about the local machine's OS?

Many thanks in reply,

Owen.

[1363 byte] By [Owen_Thomasa] at [2007-11-26 18:07:18]
# 1
You need obviously the remote system to support this through some facility like remote shell (rsh) or secure shell (ssh). so it depends on how that remote Linux system is set up and what access (userid) you can get for it.
BIJ001a at 2007-7-9 5:38:34 > top of Java-index,Core,Core APIs...