title: Read Data From .txt File and store it in JTable
body: <p>I want to redirect the output of a command "ps -e > /home/workspace/MyProject/List.txt" to <code>JTable</code>. Is there any way of doing it? If yes, how?</p>
  
  <p>PS: I want this command to be executed continuously until user exits and for <code>JTable</code> to get updated every time this command executes. </p>
  
  <pre><code> runtime.exec("ps -e &gt; /home/workspace/MyProject/List.txt");
  </code></pre>
  
  <p>I have used watchservice API to monitor changes in MyProject directory. </p>
  
  <p>So after so many edits, I came to realize that the command doesn't get executed with run.exec() When I execute it from terminal, it goes well but when I run it inside my Java program, no file is created. Can anyone tell me what am I doing wrong with it? I'm using Ubuntu 12.04.</p>