title: How do you call a text UI (whiptail or dialog) within a Java application?
body: <p>There are two Linux command line programs (<a href="https://linux.die.net/man/1/whiptail" rel="nofollow noreferrer">whiptail</a> and <a href="https://linux.die.net/man/1/dialog" rel="nofollow noreferrer">dialog</a>) that provide the ability to display a text UI to the user.  I would like to call one of these (preferably whiptail) from within my Java application so that the user can select an option from a predefined list.  The following SO questions were helpful to me in figuring out how to call a Linux command from within my code:</p>
  
  <p><a href="https://stackoverflow.com/questions/3403226/how-to-run-linux-commands-in-java-code">How to run linux commands in java code?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/1410741/want-to-invoke-a-linux-shell-command-from-java">Want to invoke a linux shell command from Java</a></p>
  
  <p>These give helpful tips on how to run a typical Linux command (e.g. "ls"), but my case is a little more complicated (I think) due to the text UI that I would like to have display to the user.</p>
  
  <p>To give an idea of what whiptail does and looks like see <a href="https://en.wikibooks.org/wiki/Bash_Shell_Scripting/Whiptail#Radio_list" rel="nofollow noreferrer">this</a>.</p>