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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

invoking linux shell commands via java vs copying sh file

 
Greenhorn
Posts: 17
Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 5733
347
IntelliJ IDE Python TypeScript Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please don't post the same question across multiple forums. Please read --> CarefullyChooseOneForum

Locked.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    Bookmark Topic Watch Topic
  • New Topic