File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call shell script(interactive) from java code

 
ritesh padhe
Greenhorn
Posts: 8
  • 0
  • 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: 2500
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.lang.ProcessBuilder
 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • 0
  • 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: 2500
10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just google for "running a script using processbuilder" or some such phrase.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic