title: How to execute a python file with some arguments in java
body: <p>String command: </p>
  
  <pre><code>python FileName.py &lt;ServerName&gt; userName pswd&lt;b&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>Process p = Runtime.getRuntime().exec(command);
  BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
  String line = "";
  while ((line = reader.readLine()) != null) {
      System.out.println(line + "\n");
  }
  </code></pre>
  
  <p>Code is neither terminating nor giving the actual results. ...</p>