title: Launching jEdit From Java Swing App Using Runtime.getRuntime().exec()
body: <p>I'm writing a Java Swing Application running on Red Hat Enterprise Linux 5 server that I would like to launch jEdit to view log files.</p>
  
  <p>Here is some example code.</p>
  
  <pre><code>public static void main(String[] args) throws IOException, InterruptedException {
  
      String cmd = "sh -c \"java -jar /tmp/jEdit/jedit.jar /tmp/test.txt\"";
  
      System.out.println(cmd);
  
      Runtime.getRuntime().exec(cmd);
  
  }
  </code></pre>
  
  <p>The output is:</p>
  
  <p>sh -c "java -jar /tmp/jEdit/jedit.jar /tmp/test.txt"</p>
  
  <p>If I copy and paste the cmd output in a terminal window, it runs fine.  </p>
  
  <p>I have tried a bunch of cmd values, but I can never get the jEdit window to be visible.  </p>
  
  <p>With changes, this process works fine on Windows.</p>
  
  <p>Is what I'm doing possible on Linux?</p>
  
  <p>Thanks in advance!</p>