Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  UnsatisfiedLinkError

    Posted 09/06/11 03:32 PM

    Originally posted by: SystemAdmin


    Hi,
    When trying to run the first example in “CPLEX 7.5 Java Guide” in Netbeans, I have the following output:
    “java.lang.UnsatisfiedLinkError:C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\bin\x64_win64\cplex122.dll: Can't find dependent libraries java.library.path must point to the directory containing the CPLEX shared library try invoking java with java -Djava.library.path=...
    Exception in thread "main" java.lang.UnsatisfiedLinkError: ilog.cplex.Cplex.CPXopenCPLEX([I)J
    at ilog.cplex.Cplex.CPXopenCPLEX(Native Method)
    at ilog.cplex.CplexI.init(CplexI.java:5391)
    at ilog.cplex.CplexI.<init>(CplexI.java:525)
    at ilog.cplex.IloCplex.<init>(IloCplex.java:9418)
    at cplexstart.Cplexstart.main(Cplexstart.java:18)
    Java Result: 1”

    I have added the cplex.jar file to the libraries (which I think it is fine since no error appears in the Netbeans’ IDE before running) and under Project Properties->Run->VMOptions, added -Djava.library.path=C:\ILOG\CPLEX_Studio_AcademicResearch122\cplex\bin\x64_win64.

    I have windows 7 (x64) and Netbeans 7.0. The Ceplex version is 12.2 (Academic version).
    I have run it as well using Eclipse and I had the same error.

    Many thanks in advance.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: UnsatisfiedLinkError

    Posted 09/06/11 08:16 PM

    Originally posted by: SystemAdmin


    After one day and half lost of my life, I found out that it was because Eclipse and Netbeans were pointing to 32bit JRE rather than 64 bit JRE.

    With the correct JRE (64-bit), the problem was solved. (I have only tested with Eclipse, but definitely that was the issue).

    Thanks anyway since I have found the solution in this forum.

    Hope it helps to someone else!
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: UnsatisfiedLinkError

    Posted 04/03/12 01:19 PM

    Originally posted by: DiegoDelleDonne


    Hi there! I seem to be having the same problem. How can I work it around? Should I change the cplex121.dll? or the cplex121.jar? or both? :p

    Thanks in advance for your guide in this issue!

    Diego
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: UnsatisfiedLinkError

    Posted 04/03/12 01:57 PM

    Originally posted by: SystemAdmin


    If I understood the resolution of the problem correctly then it was an issue with the JRE and the CPLEX dll (not the CPLEX JAR).
    You need to make sure that the JRE and the CPLEX dll are either both 32bit or both 64 bit.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: UnsatisfiedLinkError

    Posted 04/05/12 10:00 AM

    Originally posted by: DiegoDelleDonne


    Thanks Daniel! That was exactly the problem!

    I changed the JRE System Library of my project to point to a 32 bits JRE installation and it worked smoothly :-)

    I guess another fix to this problem (and probably a better one) should have been to change the cplex dll to a 64 bits version. However, this require to actually find that dll :p

    Thanks again!
    Diego
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: UnsatisfiedLinkError

    Posted 04/07/12 09:39 AM

    Originally posted by: SystemAdmin


    I am not exactly sure but you may need to download 64bit CPLEX to get the 64bit DLL. The DLLs should then be in folder INSTALLDIR/cplex/bin/x64_win64.
    #CPLEXOptimizers
    #DecisionOptimization