Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Runtime.getRuntime().exec() incredibly slow.

807605Jul 30 2007 — edited Jul 31 2007
Hi all,
I have a program that needs to call an external program to create some reports. I then take these reports and analyze them.
After some reading i ended up using the Runtime.getRuntime().exec() command but this turns out to be realy slow. It can take up de 1 minute before the report is created.

I dont think the other application is the problem because if i manualy launch it (double clicking on it) the reports are created instantaneously.

Here is what my code looks like if it can help
try {
//							execute the parser.
								System.out.println("Start of execution on StandAlone Parser.......");
									Runtime.getRuntime().exec("run.bat");
								System.out.println("........End of execution of StandAlone Parser");								
							} catch (IOException e1) {
								e1.printStackTrace();
							}	
So what is it i'm doing wrong?

Thanks for your help
Alex
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2007
Added on Jul 30 2007
20 comments
2,204 views