I didn't figured out yet how to run a external Java Application with a specify heap size in a ProcessBuilder.
The ProcessBuilder is just that simple as it should:
ProcessBuilder pb = new ProcessBuilder("java", "-jar", jar);
Process p = pb.start();
But, how can I give the Process a specify heap size.
f.E java -jar -Xms1048M -Xmx2048M somejar.jar
Thank you Guys very much :D LG
You can easily add the options when creating the ProcessBuilder:
You can use a list or a string array containing the program and its arguments, as described in the documentation.