This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

qshell script execute on Java PGM

 
Eung maeng
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
Does anyone explain how to execute a qshell.sh from Java program? I know
Process process = Runtime.getRuntime().exec ....... I can use it.
I wonder whether Java program can get a return value from qshell script. if so, how.

welcome any comments with example.

cheers,
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15485
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Runtime.exec() returns a Process object, which has a method exitValue() to get the exit value of the executed process. You'll have to call waitFor() on the Process object first to wait until it has finished before calling exitValue().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic