Originally posted by: Guiyu
Hi,
I'm struggling with the same issue.
I followed the instructions about "Configuring the Eclipse Java IDE to use CPLEX libraries"( the below link). And I can run example java program.
http://www-01.ibm.com/support/docview.wss?uid=swg21449776
But when I tried to use cp optimizer, i.e. IloCP cp = new ilog.cp.IloCP(); , I got the same error as yours:
Native code library failed to load: ensure the appropriate library (opl1271.dll/.so) is in your path.
Exceptions:
no opl1271 in java.library.path
no opl_lang_wrap_cpp in java.library.path
no opl_core_wrap_cpp_java1271 in java.library.path
no opl_core_wrap_cpp in java.library.path
no cp_oaas1271 in java.library.path
no cp_oaas in java.library.path
/Users/jiangg/Applications/IBM/ILOG/CPLEX_Studio1271/lib/libcp_wrap_cpp_java1271.jnilib: dlopen(/Users/jiangg/Applications/IBM/ILOG/CPLEX_Studio1271/lib/libcp_wrap_cpp_java1271.jnilib, 1): Library not loaded: /nfs/home/cplexadmin/jenkins/agent-optbld30x/workspace/distrib-master/label/x64-osx.optbld30x/bin/x86-64_osx/static_pic/libcplex1271.jnilib
Referenced from: /Users/jiangg/Applications/IBM/ILOG/CPLEX_Studio1271/lib/libcp_wrap_cpp_java1271.jnilib
Reason: image not found
no cp_wrap_cpp in java.library.path
no concert_wrap_cpp_java1271 in java.library.path
no concert_wrap_cpp in java.library.path
I set up the env variables:
export CLASSPATH=$CLASSPATH:(my_path)/CPLEX_Studio1271/cpoptimizer/lib/ILOG.CP.jar
export LIBRARYPATH=$LIBRARYPATH:(my_path)/CPLEX_Studio1271/cplex/bin/x86-64_osx/:(my_path)/CPLEX_Studio1271/cpoptimizer/bin/x86-64_osx/
export DYLD_LIBRARY_PATH=(my_path)/CPLEX_Studio1271/cplex/bin/x86-64_osx/:(my_path)/CPLEX_Studio1271/cpoptimizer/bin/x86-64_osx/
But the error is not fixed.
#CPOptimizer#DecisionOptimization