title: How to pass command or argoman to a process in java
body: <p>I want to run a program called VLC in java. I created it's process by Runtime. I don't know how to pass commands to this process. Also VLC program can  be controlled via command line. I want to set a Port and IP address to VLC program listen to streaming data.
  Every process in java has InputStream and OutputStream.</p>
  
  <pre><code>        Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("C:\\Program Files\\VideoLAN\\VLC\\vlc.exe");
          DataInputStream in = new DataInputStream(p.getInputStream());
  
          OutputStream out = p.getOutputStream();
  </code></pre>
  
  <p>thank you, sajad</p>