Difference between revisions of "Java"
Moskalenko (talk | contribs) (Redirected page to JDK) |
Moskalenko (talk | contribs) |
||
Line 1: | Line 1: | ||
− | # | + | [[Category:Software]] |
+ | {|<!--CONFIGURATION: REQUIRED--> | ||
+ | |{{#vardefine:app|java}} | ||
+ | |{{#vardefine:url|http://www.oracle.com/technetwork/java/javase/downloads/index.html}} | ||
+ | <!--CONFIGURATION: OPTIONAL (|1}} means it's ON)--> | ||
+ | |{{#vardefine:conf|}} <!--CONFIGURATION--> | ||
+ | |{{#vardefine:exe|}} <!--ADDITIONAL INFO--> | ||
+ | |{{#vardefine:pbs|}} <!--PBS SCRIPTS--> | ||
+ | |{{#vardefine:policy|}} <!--POLICY--> | ||
+ | |{{#vardefine:testing|}} <!--PROFILING--> | ||
+ | |{{#vardefine:faq|}} <!--FAQ--> | ||
+ | |{{#vardefine:citation|}} <!--CITATION--> | ||
+ | |{{#vardefine:installation|}} <!--INSTALLATION--> | ||
+ | |} | ||
+ | <!--BODY--> | ||
+ | <!--Description--> | ||
+ | {{#if: {{#var: url}}| | ||
+ | {{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}} | ||
+ | |||
+ | The Oracle Java Development Kit (JDK) is a development environment for building applications, applets, and components using the Java programming language. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform. | ||
+ | ==Memory Usage Note== | ||
+ | |||
+ | Depending on the JDK version, java by default uses the lesser of 1/4 of the system memory or 1 (or 2) gigabyte(s) of RAM for its heap memory. So, when using java with programs that require more memory, you may want to specify the min and max heap sizes. You can do that by providing appropriate command line arguments to java/javac, for example | ||
+ | |||
+ | <pre> | ||
+ | java -Xms128m -Xmx1024m -jar your_java_program.jar | ||
+ | </pre> | ||
+ | |||
+ | or by setting the _JAVA_OPTIONS environment variable, like so: | ||
+ | |||
+ | <pre> | ||
+ | export _JAVA_OPTIONS="-Xms128m -Xmx1024m" | ||
+ | </pre> | ||
+ | |||
+ | The above options are set when you load the jdk module. | ||
+ | |||
+ | Unfortunately, the _JAVA_OPTIONS environment variable overrides the command line "-Xms and -Xmx" switches instead of the other way around, so if you want to have direct control of the Java Heap Memory settings for every command you will need to make sure the ''_JAVA_OPTIONS'' variable is not set before you run the command that uses -Xms and -Xmx. To check the current value of the _JAVA_OPTIONS environment variable, run ''echo $_JAVA_OPTIONS''. To unset the value of the _JAVA_OPTIONS environment variable, run ''unset _JAVA_OPTIONS''. | ||
+ | |||
+ | <!--Modules--> | ||
+ | ==Required Modules== | ||
+ | ===Serial=== | ||
+ | * java | ||
+ | |||
+ | ==System Variables== | ||
+ | * JAVA_HOME | ||
+ | * _JAVA_OPTIONS | ||
+ | * HPC_JDK_DIR | ||
+ | * HPC_JDK_BIN | ||
+ | <!--Configuration--> | ||
+ | {{#if: {{#var: conf}}|==Configuration== | ||
+ | See the [[{{PAGENAME}}_Configuration]] page for {{#var: app}} configuration details. | ||
+ | |}} | ||
+ | <!--Run--> | ||
+ | {{#if: {{#var: exe}}|==Additional Information== | ||
+ | WRITE_ADDITIONAL_INSTRUCTIONS_ON_RUNNING_THE_SOFTWARE_IF_NECESSARY | ||
+ | |}} | ||
+ | <!--PBS scripts--> | ||
+ | {{#if: {{#var: pbs}}|==PBS Script Examples== | ||
+ | See the [[{{PAGENAME}}_PBS]] page for {{#var: app}} PBS script examples. | ||
+ | |}} | ||
+ | <!--Policy--> | ||
+ | {{#if: {{#var: policy}}|==Usage Policy== | ||
+ | WRITE USAGE POLICY HERE (Licensing, usage, access). | ||
+ | |}} | ||
+ | <!--Performance--> | ||
+ | {{#if: {{#var: testing}}|==Performance== | ||
+ | WRITE_PERFORMANCE_TESTING_RESULTS_HERE | ||
+ | |}} | ||
+ | <!--Faq--> | ||
+ | {{#if: {{#var: faq}}|==FAQ== | ||
+ | *'''Q:''' **'''A:'''|}} | ||
+ | <!--Citation--> | ||
+ | {{#if: {{#var: citation}}|==Citation== | ||
+ | |||
+ | |}} | ||
+ | <!--Installation--> | ||
+ | {{#if: {{#var: installation}}|==Installation== | ||
+ | See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}} | ||
+ | <!--Turn the Table of Contents and Edit paragraph links ON/OFF--> | ||
+ | __NOTOC____NOEDITSECTION__ |
Revision as of 02:53, 5 November 2012
Description
The Oracle Java Development Kit (JDK) is a development environment for building applications, applets, and components using the Java programming language. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform.
Memory Usage Note
Depending on the JDK version, java by default uses the lesser of 1/4 of the system memory or 1 (or 2) gigabyte(s) of RAM for its heap memory. So, when using java with programs that require more memory, you may want to specify the min and max heap sizes. You can do that by providing appropriate command line arguments to java/javac, for example
java -Xms128m -Xmx1024m -jar your_java_program.jar
or by setting the _JAVA_OPTIONS environment variable, like so:
export _JAVA_OPTIONS="-Xms128m -Xmx1024m"
The above options are set when you load the jdk module.
Unfortunately, the _JAVA_OPTIONS environment variable overrides the command line "-Xms and -Xmx" switches instead of the other way around, so if you want to have direct control of the Java Heap Memory settings for every command you will need to make sure the _JAVA_OPTIONS variable is not set before you run the command that uses -Xms and -Xmx. To check the current value of the _JAVA_OPTIONS environment variable, run echo $_JAVA_OPTIONS. To unset the value of the _JAVA_OPTIONS environment variable, run unset _JAVA_OPTIONS.
Required Modules
Serial
- java
System Variables
- JAVA_HOME
- _JAVA_OPTIONS
- HPC_JDK_DIR
- HPC_JDK_BIN