The first executable statement in our example obtains a Gurobi
environment (using the GRBEnv() constructor):
// Create empty environment, set options, and start
GRBEnv env = new GRBEnv(true);
env.set("logFile", "mip1.log");
env.start();
In this call we requested an empty environment, chose a log file, and started the environment.
Later calls to create an optimization model will always require an environment, so environment creation is typically the first step in a Gurobi application.