I would advise against this approach .getRuntime() ... if you have a large application. This approach opens the process, so if you use it from a large program (for example, on an application server), the plug can eat all your available RAM.
Saifahhmed
source share