Java

Overview

Java Runtime Environment Version 1.6.0 and 1.7.0 are installed on the iCSF.

Restrictions on use

There are no licensing restrictions to running this software.

Set up procedure

No modulefile is required as Java is available by default across the system.

However, if your application is display a graphical user interface (GUI) then the user interface may appear sluggish / slow to display. Try loading the following module to improve the performance:

module load tools/java/guifix

This will set the _JAVA_OPTIONS environment variable to be

-Dsun.java2d.pmoffscreen=false

which can speed up some Java GUIs. A side-effect of this is that your application may create a small java log file in your current directory which can be deleted.

Running the application

Simply run the java application in the usual way. For example:

java my_app_class arg1 arg2

where my_app_class is the name of your application’s class to be called and arg1 arg2 are any optional arguments your application requires.

Additional flags can be passed to the java runtime. For example, to restrict the number of threads used by the garbage collectors to one, use

java -XX:ParallelGCThreads=1 -XX:ParallelCMSThreads=1 my_app_class arg1 arg2

Add the following flag to your java command line to restrict memory usage to 4GB for example:

-Xmx4000M

Further info

None.

Updates

None.

Last modified on August 5, 2014 at 3:16 pm by Site Admin