Originally posted by: SystemAdmin
The first step is to register the CPLEX library with Eclipse. You may already have done part of this, but just to be safe I'll go through the whole process.
Go to Window > Preferences > Java > Build Path > User Libraries and click New. Give an appropriate name (e.g., CPLEX 10.2) and leave the system library box unchecked. Now click Add JARs, navigate to the cplex.jar file, and select it. Now highlight the cplex.jar entry and expand it. Select Javadoc location and browse for the correct directory. With CPLEX 12.1 (in the US) it's .../cplex121/doc/html/en-US/refjavacplex/html, but your mileage may vary. Once you've located the Javadoc, select Native library location and browse to where the libraries are located. The locations are platform specific (somewhere in the CPLEX installation tree, of course), but the path will be under the CPLEX bin directory, in a folder whose name designates your hardware platform (likely x86_... if you're a PC user). The folder will contain .dll files if you're on Windows, a shared library file (.so) and some executables on Linux, etc. Once you've got the library setting correct, click Ok to get out of the dialog.
Now right click your project in the project navigator, select Build Path > Add Libraries > User Library, and add the CPLEX library. (You may already have done this, since you seem to be able to compile your application.) The user library entry will now provide both the path to cplex.jar (for compilation) and the path to the libraries (for execution).
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
#DecisionOptimization#MathematicalProgramming-General