title: firing a command through terminal in Ubuntu using Java Runtime.exec
body: <p>This is fairly simple in Windows, but a little tricky in Linux. I am using </p>
  
  <pre><code>Runtime.getRuntime().exec(new String[] { "/bin/bash", "-c", "java -classpath /home/4/byz/Orc" });
  </code></pre>
  
  <p>where Orc is the class file with a main function.
  But nothing happens. Are there any settings ? Am I doing something wrong ? </p>
  
  <p>I wish the java program to run in the terminal.</p>
  
  <h2>EDIT</h2>
  
  <p>Here is the solution:</p>
  
  <pre><code>        String[] cmdArray = {"gnome-terminal","java -classpath /home/r/byz/ Orchestrator"};
  
          try {
              Runtime.getRuntime().exec(cmdArray);
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  </code></pre>
  
  <p>So basically, we have to use gnome-terminal ..</p>