Frank Tap wrote:I am running a windows exe using Runtime.getruntime().exec. This works fine. However I am running the same exe hundreds of time and I would like to keep it in memory. The exec command deletes the tread after it is finished. Is there a way to keep the process in memory after it is finished and run it again?
And further to Jayesh's good advice, I'd suggest that this sort of micro-optimization is way premature, and probably harmful - especially for something that only runs hundreds of times.
Hundreds of millions of times - then it might be worth thinking about; but only if you can prove that it actually has a significant benefit.
W.A. Wulf wrote:More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason — including blind stupidity.