Compile Java programs on Big Red II at IU

On this page:

Add the Java compiler to your user environment

The Java programming language compiler (javac) is available on Big Red II at Indiana University.

To add it to your Big Red II user environment, load the java module; on the command line, enter:

  module load java

To make permanent changes to your environment, edit your ~/.modules file. For more, see Use a .modules file in your home directory to save your user environment on an IU research supercomputer.

For more about using Modules to configure your user environment, see Use Modules to manage your software environment on IU's research computing systems.


To compile a Java program (for example,, on the command line, enter:


If the program compiles correctly, a bytecode class file (e.g., simple.class) is created. To run the program, use the java command:

  java simple


The javac compiler has its own unique set of standard options, and does not support optimizations or threads.

For a summary of options for the javac compiler, see the javac manual file on Big Red II; on the command line, enter:

  man javac

Run Java code

Java code compiled with the current Java module ( java/jdk1.7.0_07) will run only in Big Red II's Cluster Compatibility Mode (CCM) execution environment. Before submitting a batch job, make sure you've added the ccm module to your ~/.modules file and prepared a TORQUE job script that will launch your application in the CCM execution environment. For instructions, see Run batch jobs on Big Red II.

Get help

Support for IU research computing systems, software, and services is provided by the Research Technologies division of UITS. To ask a question or get help, contact UITS Research Technologies.

This is document bdnn in the Knowledge Base.
Last modified on 2019-02-19 11:17:18.

Contact us

For help or to comment, email the UITS Support Center.