In some cases, a Java program might produce an out-of-memory error, even though the same model can be solved as an LP or MPS file.
The memory heap in Java is fixed at runtime, which can lead to an out-of-memory condition. However, you can adjust the size of the memory heap by setting the -Xmx parameter when you launch the Java VM.
For example, if you want to use 4 GB of memory to run the Diet the program, you could launch it with this command:
java -cp /opt/gurobi1201/linux64/lib/gurobi.jar -Xmx4g Diet