You may see a java.lang.NoClassDefFoundError exception when using the Gurobi Java API. Examples:
java.lang.NoClassDefFoundError: gurobi/GRBException java.lang.NoClassDefFoundError: Could not initialize class gurobi.GurobiJni
This error indicates that the Gurobi Java API (gurobi.jar) was not found within your Java classpath at the time of execution. You can find this file in the lib subdirectory of the Gurobi installation.
To set the classpath for Java on Linux, you can use the CLASSPATH environment variable. You can also use the command-line option -cp or -classpath for the Java Runtime Environment.