Java: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 64: Line 64:


<!--T:9-->
<!--T:9-->
Alternatively, you can use the <tt>_JAVA_OPTIONS</tt> environment variable to set the run-time options rather that passing them on the command line. This is especially convenient if you launch multiple Java calls, or call a Java program from another Java program. Here is an example how to do it:  
Alternatively, you can use the <tt>JAVA_TOOL_OPTIONS</tt> environment variable to set the run-time options rather that passing them on the command line. This is especially convenient if you launch multiple Java calls, or call a Java program from another Java program. Here is an example how to do it:  
{{Command|export _JAVA_OPTIONS{{=}}"-Xms256m -Xmx2g"}}
{{Command|export JAVA_TOOL_OPTIONS{{=}}"-Xms256m -Xmx2g"}}
When your Java program is run, it will produce a diagnostic message like this one "Picked up _JAVA_OPTIONS", verifying that the options have been picked up.
When your Java program is run, it will produce a diagnostic message like this one "Picked up JAVA_TOOL_OPTIONS", verifying that the options have been picked up.


<!--T:10-->
<!--T:10-->
Bureaucrats, cc_docs_admin, cc_staff, rsnt_translations
2,837

edits

Navigation menu