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 ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

invoking linux shell commands via java vs copying sh file

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

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



Thanks,
Saurabh
 
Sheriff
Posts: 4673
308
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

Locked.
 
Message for you sir! I think it is a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!