ARCHIVED: Compile Java programs on Big Red II at IU
On this page:
Big Red II was retired from service on December 15, 2019; for more, see ARCHIVED: About Big Red II at Indiana University (Retired).
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
For more, see Use modules to manage your software environment on IU research supercomputers.
Example
To compile a Java program (for example, simple.java
), on the command line, enter:
javac simple.java
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
Options
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 ARCHIVED: Run batch jobs on Big Red II.
Get help
Research computing support at IU is provided by the Research Technologies division of UITS. To ask a question or get help regarding Research Technologies services, including IU's research supercomputers and research storage systems, and the scientific, statistical, and mathematical applications available on those systems, contact UITS Research Technologies. For service-specific support contact information, see Research computing support at IU.
This is document bdnn in the Knowledge Base.
Last modified on 2023-04-21 16:58:52.