Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to call shell script(interactive) from java code  RSS feed

 
ritesh padhe
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to call shell script from java code. Once shell script is executed it will ask for the confirmation from user(yes or no) and after getting value from user it will proceed.
Any pointers?

Thanks in advance.
 
Tim Moores
Saloon Keeper
Posts: 3824
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.ProcessBuilder
 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:java.lang.ProcessBuilder


Hi Tim,

Can you please show it with a small example that will make understanding more clearer ...thanks in advance...!!
 
Tim Moores
Saloon Keeper
Posts: 3824
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just google for "running a script using processbuilder" or some such phrase.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!