Hi, I want to execute a linux script from my java program residing on a windows machine. Can anybody help me in this regard? I can use the other tools like telnet to connect to linux machine and execute scripts but I would like to do it from the java program without going through the tools. Appreciate your suggestions
A Java application can use Telnet programmatically through a library like Apache Commons Net. That would be one way.
Another would be to run a servlet (or some kind of server-side web component) on the Linux box that starts the script using ProcessBuilder or Runtime.exec. The Java app could then start it by accessing a particular URL.