title: How to execute sql script file in java in Unix
body: <p>I have this sql script that I would like to execute in a java program.  It takes on 3 parameters: dropper_id, to_char(begin_dt), to_char(end_dt).  How would I do this?</p>
  
  <p>The program is held on a Unix server.</p>
  
  <p>The sql script is also located on the Unix server.</p>
  
  <p>I think i would most likely want to execute the program by command line, but how do I execute it with parameters?</p>
  
  <pre><code>Process p = Runtime.getRuntime().exec ("psql sql_script.sql");
  </code></pre>