I am trying to compile the column generation example cutstock.java that comes along the IBM ILOG technology. The code is available here:


In my installation, all sources of this example are in directory


I copy the entire directory with the source files to my working directory and use the following command to compile it:

javac -cp /opt/ibm/ILOG/CPLEX_Studio1251/cplex/lib/cplex.jar:/opt/ibm/ILOG/CPLEX_Studio1251/opl/lib/oplall.jar:. src/cutstock/Cutstock.java -d bin/ -Xdiags:verbose

I get the following error messages:

rc/cutstock/Cutstock.java:85: error: method getDual in class IloCplex cannot be applied to given types;
                    duals.set(i, masterCplex.getDual(forAll));
  required: IloRange
  found: IloForAllRange
  reason: argument mismatch; IloForAllRange cannot be converted to IloRange
src/cutstock/Cutstock.java:105: error: cannot find symbol
                IloIntMap newFill = masterCplex.intMap(items);
  symbol:   method intMap(IloIntRange)
  location: variable masterCplex of type IloCplex
2 errors

I haven't made any changes in the example, so I expected it to work normally. I am new to the Concert technology and would like to learn how to develop a column generation procedure. Can anyone please suggest how to fix these errors and successfully compile the code?

asked 21 Apr '18, 11:35

Marika's gravatar image

accept rate: 0%

I haven't tried this, but looking at the build_common.xml file (for CPLEX 12.8 -- I don't have 12.5.1 installed anymore), I see a reference to oplall.jar but no reference to cplex.jar. What happens if you either omit cplex.jar from the class path or move it after oplall.jar? I wonder if there are some methods defined in both jar files, with the compiler grabbing the version in cplex.jar when it should be using the one in oplall.jar.


answered 21 Apr '18, 13:46

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

Thank you so much! It seems like there was a conflict between the two jars. Your suggestion helped and after removing cplex.jar from the classpath, the compilation run through without any problems.

(21 Apr '18, 19:44) Marika
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 21 Apr '18, 11:35

Seen: 1,286 times

Last updated: 21 Apr '18, 19:44

OR-Exchange! Your site for questions, answers, and announcements about operations research.