Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  Java doesn't find cpp librarys

    Posted Tue March 20, 2012 12:31 PM

    Originally posted by: Sibsib


    Hello Dears,

    I tried to run the following example in Java:

    http://publib.boulder.ibm.com/infocenter/odmeinfo/v3r4/index.jsp?topic=%2Filog.odms.ide.odme.help%2FContent%2FOptimization%2FDocumentation%2FODME%2F_pubskel%2FODME_pubskels%2Fstartall_ODME34_Eclipse1758.html

    I added as external Jar the oplall.jar from the CPLex_studio_academic_123 folder and put as VM arguments "-Djava.library.path=C:\<path>\CPLEX_Studio_Academic123\opl\bin\x64_win64;".

    Now, I get the following exception:

    Native code library failed to load: ensure the appropriate library (opl123.dll/.so) is in your path.
    Exceptions:
    C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\bin\x64_win64\opl123.dll: Can't find dependent libraries
    no opl_lang_wrap_cpp in java.library.path
    no opl_core_wrap_cpp_java123 in java.library.path
    no opl_core_wrap_cpp in java.library.path
    no cp_wrap_cpp_java123 in java.library.path
    no cp_wrap_cpp in java.library.path
    no concert_wrap_cpp_java123 in java.library.path
    no concert_wrap_cpp in java.library.path

    Exception in thread "main" java.lang.ExceptionInInitializerError
    at ilog.concert.cppimpl.concert_wrap.setDebugWrappers(concert_wrap.java:34)
    at ilog.opl.IloOplFactory.setDebugMode(IloOplFactory.java:152)
    at Test2.run(Test2.java:46)
    at Test2.main(Test2.java:30)

    So, what did I do wrong?
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Java doesn't find cpp librarys

    Posted Wed March 21, 2012 10:33 AM

    Originally posted by: SystemAdmin


    Does your PATH environment variable contain C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\bin\x64_win64 ?
    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Java doesn't find cpp librarys

    Posted Thu March 22, 2012 10:25 AM

    Originally posted by: Sibsib


    Yes.
    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: Java doesn't find cpp librarys

    Posted Thu March 22, 2012 03:51 AM

    Originally posted by: cordobes


    Hello,

    I am facing the same problem. I used the following set-up:

    PATH environment variables:
    C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\bin\x64_win64
    C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\oplide
    C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\lib
    C:\IBM\ILOG\CPLEX_Studio_Academic123\cplex\bin\x64_win64

    VM Arguments:
    -Djava.library.path=C:\IBM\ILOG\CPLEX_Studio_Academic123\cplex\bin\x64_win64;C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\bin\x64_win64;C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\oplide

    External JARs:
    cplex.jar (C:\IBM\ILOG\CPLEX_Studio_Academic123\cplex\lib)
    oplall.jar (C:\IBM\ILOG\CPLEX_Studio_Academic123\opl\lib)
    However, I get the following errors:

    Caused by: java.lang.RuntimeException: Native code library failed to load: ensure the appropriate library (opl10.dll/.so) is in your path.
    Exceptions:
    no opl10 in java.library.path
    no opl_lang_wrap_cpp in java.library.path
    no opl_core_wrap_cpp_java10 in java.library.path
    no opl_core_wrap_cpp in java.library.path
    no cp_wrap_cpp_java10 in java.library.path
    no cp_wrap_cpp in java.library.path
    no concert_wrap_cpp_java10 in java.library.path
    no concert_wrap_cpp in java.library.path

    Exception in thread "main" java.lang.ExceptionInInitializerError
    at ilog.concert.cppimpl.concert_wrap.setDebugWrappers(concert_wrap.java:34)
    at ilog.opl.IloOplFactory.setDebugMode(IloOplFactory.java:152)
    at oplrunsample.run(oplrunsample.java:47)
    at oplrunsample.main(oplrunsample.java:31)

    (In contrast to "Sibsib" my Eclipse searches for and doesn't find opl10.dll (Sibsib: opl123.dll), although the existing DLL in the folder is named opl123)

    I'd highly appreciate any help! Thanks!
    #CPOptimizer
    #DecisionOptimization


  • 5.  Re: Java doesn't find cpp librarys

    Posted Thu March 22, 2012 10:29 AM

    Originally posted by: Sibsib


    I think this error lies within the manifest file of the cplex.jar. There, it is denoted that the Version-number is 1.0.
    When I removed the cplex.jar, I didn't get this error anymore..
    #CPOptimizer
    #DecisionOptimization


  • 6.  Re: Java doesn't find cpp librarys

    Posted Fri March 30, 2012 05:07 AM

    Originally posted by: cordobes


    Thanks a lot: removing the cplex.jar and only using the oplall.jar solved the problem!
    #CPOptimizer
    #DecisionOptimization


  • 7.  Re: Java doesn't find cpp librarys

    Posted Tue November 18, 2014 12:15 PM

    Originally posted by: lfeng


    Yes. I tried adding oplall.jar for both CPLEX and CP. It works for both of them without any problem.


    #CPOptimizer
    #DecisionOptimization