For my first attemp to use CP Optimizer with java, when i run my program i get this error message :
Exception in thread "main" java.lang.NoSuchMethodError: SwigDirector_IloIntValueEvalWrapper_eval
at ilog.cp.cppimpl.cp_wrapJNI.swig_module_init(Native Method)
at ilog.cp.cppimpl.cp_wrapJNI.<clinit>(cp_wrapJNI.java:802)
at ilog.cp.cppimpl.IloCP.<init>(IloCP.java:109)
at ilog.cp.IloCP.<init>(IloCP.java:128)
at ilog.cp.IloCP.<init>(IloCP.java:120)
at buffPos.main(buffPos.java:73)
Knowing that I included the needed libraries ILOG.CP.jar and oplall.jar in the library setting of my project in IntelliJ IDEA and also in the environment variable PATH of my windows. I'm using jdk 15.0.1
The part of my program using iloIntVar is :
// define new model
IloCP modelPos = new IloCP();
// variables
IloIntVar[][] x = new IloIntVar[ligne + 1][];
for (int i = 0; i < ligne + 1; i++) {
x[i] = modelPos.boolVarArray(colone + 1);
}
IloIntVar[][] a = new IloIntVar[ligne + 1][colone + 1];