Basically what I need is, I want to run a shell script present on remote linux machine along with that I need to pass one list collection as an argument to that script and fetch the result back in java code to print and store in object.
Asked
Active
Viewed 66 times
-1
-
3Have you even googled this? – Mena Sep 12 '16 at 10:56
-
1yes.. but i am not getting that how shall i send or make it accessible text file from java to unix containing list of string for processing. – Java_learner Sep 13 '16 at 03:30
1 Answers
1
I think Old post in stackoverflow will help you on this

Community
- 1
- 1

Abhilash Arjaria
- 142
- 2
- 10
-
1I have seen this but I am not sure, how to connect to remote linux machine before executing this code. – Java_learner Sep 13 '16 at 03:31
-
1Try This Solution :: http://www.codesandscripts.com/2014/10/java-program-to-execute-shell-scripts-on-remote-server.html – Abhilash Arjaria Sep 13 '16 at 05:21
-
1JSch is an excellent library for supporting remote connections over ssh, including the execution of remote commands (or shell scripts). There are numerous examples of how to use JSch at JSch Examples – Abhilash Arjaria Sep 13 '16 at 05:23
-
1Thanks for the information. I will try this and respond after that. Can you please also specify in which scenario we use process builder.. I mean when we are using process builder how connection is made with linux machine. Thanks again for the help! – Java_learner Sep 13 '16 at 05:53