Wednesday, November 17, 2010

How can you change tthe amount of memory allocated to the Java Virtual machine?

...on a mac computer.How can you change tthe amount of memory allocated to the Java Virtual machine?
I am assuming you are talking about a stand alone java program. In this case, you can specify that on the command line. For example, to allowcate 30mb of heap size for jvm you could run y our app with



java -mx 30m yourApp



you can also set the starting heap size with -ms n parameter

No comments:

Post a Comment