User Tools

Site Tools


en:programmation-java

How to compile java program

In Linux, Java compiler is installed by default. However, you can load the java module to get version 1.8 from oracle.

module load java

If your program uses the cplex library and it's not already loaded, you should load it like this:

module load cplex-studio

You can then compile your program

javac Warehouse.java

How to execute Java program

a Java program can be executed using the command java. For example:

java Warehouse

In certain cases, you might need to define the CLASSPATH variable in your .bashrc configuration file.

export CLASSPATH=.

If you do so, make sure that line appears before any modules are loaded.

en/programmation-java.txt · Last modified: 2016/11/15 20:06 by admin