Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call shell script(interactive) from java code

 
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
Bartender
Posts: 2680
35
  • 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
Bartender
Posts: 2680
35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just google for "running a script using processbuilder" or some such phrase.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic