Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

invoking linux shell commands via java vs copying sh file

Posts: 17
Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator

We need to execute 3-4 shell commands from a Java application.
We are able to do it successfully using jcraft jsch library.
Now is invoking each command separately from Java code is better approach than copying a shell file to the target machine & executing as single command from java?
Target machine is over network, so network IO is one aspect.
is there any other difference from design perspective?

Sample code

Posts: 4673
IntelliJ IDE Clojure Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question across multiple forums. Please read --> CarefullyChooseOneForum

Message for you sir! I think it is a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!