Originally posted by: Ph.Gregoire
Hello,
Unfortunately, this will not be possible.
The windows process which is executing the native code from the opl/cplex* DLLs can hold only one version of a given DLL, so your Tomcat process will be able to use only one version at a time.
The reason why the DLL loading does not work is that only one 'top/head' DLL is explicitly loaded by the OPL runtime (through Java/JNI bindings), say opl1261.dll, the other DLLs are referenced from that top/head one through DLL-level dependencies resolved by the windows OS.
java.library.path is used by Java to locate this DLL, but then the windows OS tries to resolve the dependencies using OS mechanisms which are based on PATH env variable.
Now, since the DLLs have mostly different names for each version, you could add all of the COS version to the PATH, and the correct top DLL would be picked up by version number, except for the db*.dll which are not named after the version.
You may even be able to load all of them simultaneously in the same process (with classloader isolation for the Java part), except for db*.dll which are not named after the version, and may be incompatible across versions.
A tool like depends on windows will show the dependencies.
Philippe
#DecisionOptimization#OPLusingCPLEXOptimizer