• 1 reply
  • Latest Post - ‏2013-07-19T16:30:55Z by rdumeur
1 Post

Pinned topic running SchedRCPSP example on Mac ?

‏2013-07-19T14:33:02Z |



I just installed the CPLEX_stupio1251 in order to use cpoptimizer.

I am currently trying to get running the code given as example for a RCPSP problem.

Using java, I built a new project with the file given :  CPLEX_Studio1251/cpoptimizer/examples/src/java/SchedRCPSP

then added the jar: CPLEX_Studio1251/cpoptimizer/lib/ILOG.CP.jar

But I do get the error: "

Native code library failed to load: ensure the appropriate library (opl1251.dll/.so) is in your path.


no opl1251 in java.library.path

no opl_lang_wrap_cpp in java.library.path



From my search I need to add a native library from opl .....

but the thing is that I am a mac user, and opl is not compatible


What I am missing ?




  • rdumeur
    109 Posts

    Re: running SchedRCPSP example on Mac ?


    Dear Alban,

    What version of MacOS X are you using?

    Also, please run  the CP optimizer java examples installed in <installdir>/cpoptimizer/examples/src/java. They should function correctly when you execute them using the makefile in <installdir>/cpoptimizer/examples/<platform>/<arch>.

    Looking at env variables used in the makefile, we can see directives as:CPCLASSPATH = ../../../lib/ILOG.CP.jar
    LIBRARYPATH = ../../../bin/x86-64_osx:$(CPLEXDIR)/bin/x86-64_osx
    JAVAEXDIR = ../../../examples/src/java
        @echo "Currently, JAVA_HOME = $(JAVA_HOME)"

    So please make sure that the correct DYLD_LIBRARY_PATH is set when invoking your example.

    I hope this helps,