Difference between revisions of "Template:JAVA OPTIONS"

From UFRC
Jump to navigation Jump to search
(Created page with " To set the heap memory to be used by a java program export the '_JAVA_OPTIONS' variable in the environment the program runs in - either on the command line, in a personal mod...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
<noinclude>[[Category:Templates]]</noinclude>
 +
To set the heap memory to be used by a java program export the ''_JAVA_OPTIONS'' variable in the environment the program runs in - either on the command line, in a personal module, or in a job script. For example,
  
To set the heap memory to be used by a java program export the '_JAVA_OPTIONS' variable in the environment the program runs in - either on the command line, in a personal module, or in a job script. For example,
+
export _JAVA_OPTIONS="-Xms1g -Xmx4g"
  
export _JAVA_OPTIONS="-Xms1g -Xmx4g"
+
will set Java heap memory usage to a minimum of 1g and a maximum of 4g. Please note that ''_JAVA_OPTIONS'' environment variable overrides the respective command-line arguments. For example, the above <code>'_JAVA_OPTIONS'</code> variable will override the <code>'-Xmx500m'</code> argument in
  
will set Java heap memory usage to a minimum of 1g and a maximum of 4g.
+
''java -Xmx500m -jar someprogram.jar...''.

Latest revision as of 15:26, 19 December 2014

To set the heap memory to be used by a java program export the _JAVA_OPTIONS variable in the environment the program runs in - either on the command line, in a personal module, or in a job script. For example,

export _JAVA_OPTIONS="-Xms1g -Xmx4g"

will set Java heap memory usage to a minimum of 1g and a maximum of 4g. Please note that _JAVA_OPTIONS environment variable overrides the respective command-line arguments. For example, the above '_JAVA_OPTIONS' variable will override the '-Xmx500m' argument in

java -Xmx500m -jar someprogram.jar....