title: run jar in eclipse
body: <p>My problem is that I want to run some jar files in eclipse within a plugin. This jars make analysis on an eclipse project:</p>
  
  <pre><code>String run_tool ="cmd.exe /C start java -Xmx400m -cp org-jcolumbus.jar;org-jcolumbus-schema.jar;lib/antlr.jar org.jcolumbus.tool.BuildModel -tasks "+src_dir+" -jsi "+SelProj.getLocation()+"/result/temp/"+SelProj.getName();
  Runtime rt2 = Runtime.getRuntime();
  Process sp2 = rt2.exec(run_tool);
  </code></pre>
  
  <p>"<code>src_dir</code>" is source dir of the eclipse project</p>
  
  <p><code>"SelProj.getLocation()+"/result/temp/"+SelProj.getName()"</code> is a result dir in the selected eclipse project, the results come here.</p>
  
  <p>After the jars' running, I want to rename the "temp" folder to other one, but the eclipse renames the "temp" folder before the jars finish the running, so the jars don't work fairly.</p>
  
  <p>I try to use the <code>sp2.waitFor()</code> method, but it isn't good. I think the "start" parameter, after <code>cmd.exe /C start</code> in new process, what I can't control.<br>
  If anybody has some advice, please give me. Thank's.  </p>