Hi!
My problem is that I want to run some jar files in eclipse within a plugin. This jars make analysis on an eclipse project:
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);
"src_dir
" is source dir of the eclipse project
"SelProj.getLocation()+"/result/temp/"+SelProj.getName()"
is a result dir in the selected eclipse project, the results come here.
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.
I try to use the sp2.waitFor()
method, but it isn't good. I think the "start" parameter, after cmd.exe /C start
in new process, what I can't control.
If anybody has some advice, please give me. Thank's.