Java Code to run Mac Terminal command to Tweak JVM memory
<p>I am developing a Application using JavaFx 2.2.3 and jdk 1.7.0_09.This application will run on Windows, and Mac Osx.
The problem is I am getting Out-Of-Memory.
I know -Xms and -Xmx are used to tweak JVM memory. But requirement is we have to set JVM memory using java code as This is a desktop application so we can't tweak JVM on every system.</p>

<p>Now I find a solution for windows </p>

<p>proc = Runtime.getRuntime().exec("cmd.exe /c java -Xms250m -Xmx1024m -jar \"application.jar\" /n");</p>

<p>By using this code i can increase JVM memory before starting my Application jar.
But this is a solution for Windows only.</p>

<p>Can any one tell similar kind of code For Mac.</p>
