Difference between revisions of "Java"

From UFRC
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:Software]]
+
[[Category:Software]][[Category:Programming]]
 
{|<!--CONFIGURATION: REQUIRED-->
 
{|<!--CONFIGURATION: REQUIRED-->
 
|{{#vardefine:app|java}}
 
|{{#vardefine:app|java}}
Line 79: Line 79:
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__
=Validation=
 
* Validated 4/5/2018
 

Latest revision as of 19:10, 15 August 2022

Description

java website  

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, so must be modified after loading the 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