title: executing java with python and then give it to data
body: <p>I try to test my Java class using python, i use suproccess in a "for loop"</p>
  
  <pre><code>&gt;&gt;&gt; import subprocess
  &gt;&gt;&gt; for x in range(1, 6):
  ...     subprocess.call(["java", "Watermelon"])
  ... 
  </code></pre>
  
  <p>so when the Watermelon is executing waiting for input...</p>
  
  <pre><code>public class Watermelon{
      public static void main(String[]args){
      Scanner sc = new Scanner(System.in);
  
      int w = sc.nextInt();
  </code></pre>
  
  <p>and i have to input the "value" and press ENTER to Watermelon get the "value" and the loop from python continues and input the "value" again and ... to the end.</p>
  
  <p>Can you help me to use "x" in python loop like the "value" to java class... </p>
  
  <p>Thanks for your help and excuse me by my English.</p>