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
a Java program can be executed using the command
java. For example:
In certain cases, you might need to define the CLASSPATH variable in your .bashrc configuration file.
If you do so, make sure that line appears before any modules are loaded.