4 Replies Latest reply on Nov 3, 2012 10:13 AM by 972301

    Executing terminal command using JavaCode


      My requirement is to set JVM heap memory -Xms and Xmx using java code.
      I search for this and find out a solution for windows. Wanted a similar solution for Mac as well.
      Here is the code which i used for Windows.

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

      Can any one tell how i can achieve similar kind of functionality for Mac.