I have to execute a command line many times when some event is triggered. For this Ive been using Runtime.exec() for executing each command line. This seems to take up a lot of memory. Is there a better way to do it?
Thanks<br />Karthik<br />SCJP 1.4, CCNA.<br /> <br />"Success is relative. More the success, more the relatives."
"Karthik" - Please review our site's naming policy at your earliest convenience. We prefer that all screen names follow this convention. Thank you. There are other ways to accomplish what you want, but none of them are nearly so simple as what you're doing now. For more efficient use of resources, you'll probably need to create a program that can thread your command-line invocations within a single process space. It's also possible that what you're invoking might be easily rewritten to be more efficient.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Joined: Dec 22, 2002
Thanks. And sorry about the name, I've changed it to my full name.