Decision Optimization

Decision Optimization

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


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

    Posted 02/02/14 05:16 PM

    Originally posted by: M9HC_Keith_Hermiz


     

    Hi,

    I'm trying to run some java (running V7 build 51) code calling cplex 12.5 under eclipse (juno) on a mac running lion. I know this error has been addressed a number of times but I think I've done everything suggested to no avail. Error is:

     

    java.lang.UnsatisfiedLinkError: no cplex125 in java.library.path

    java.library.path must point to the directory containing the CPLEX shared library

    try invoking java with java -Djava.library.path=...

     

    cplex works from the command line. I can explicitly load the library libcplex125.jnilib with a System.load() yet I still get the above error. I have added the path to the library under the Native library for cplex.jar and have added the path VM parameter in the run configuration.

     

    Any other things to try? I'm at a loss.

     

    Thanks in advance.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: java.lang.UnsatisfiedLinkError

    Posted 02/03/14 04:30 AM

    Can you please show us the exact command line you use to fire up the JVM?

    Maybe also a screenshot from the "Arguments" tab of the run configuration?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: java.lang.UnsatisfiedLinkError

    Posted 02/03/14 07:04 AM

    Originally posted by: M9HC_Keith_Hermiz


    Daniel, I'm not sure what you mean by your first question. I don't invoke the JVM, eclipse does. The only runtime parameter is the path specification below.

    Here's what's in the VM arguments box. Screen shot is attached.

    -Djava.library.path=/Users/kbhermiz/Applications/IBM/ILOG/CPLEX_Studio125/cplex/bin/x86-64_darwin

    Thank you for taking a look at this. --K


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: java.lang.UnsatisfiedLinkError

    Posted 02/03/14 11:02 AM

    What I meant was the exact command line that eclipse uses to fire up the JVM.

    At first glance your configuration looks correct. I am not sure what eclipse will do to the quotes you have around the path. Will it invoke the JVM through a shell (in which case the quotes will get stripped) or will it pass the stuff as is to the JVM (in which case the quotes will be considered part of the path and will hurt). Maybe also try without the quotes, just to be sure.

    Other things you should check:

    • Does a the library /Users/kbhermiz/Applications/IBM/ILOG/CPLEX_Studio125/cplex/bin/x86-64_darwin/libcplex125.jnilib exist and is readable and executable?
    • Are you by any chance mixing a 64bit library and a 32bit JVM (or vice versa)? Note that the JVM fired up by eclipse is not necessarily the same you get when you just run 'java' from the console.
    • Are you familiar with the dtruss utility? Can you use that to track what jnilib files the JVM attempts to open and what the error codes for opening those files are?
    • Does it help to include /Users/kbhermiz/Applications/IBM/ILOG/CPLEX_Studio125/cplex/bin/x86-64_darwin in environment variable DYLD_LIBRARY_PATH?

    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: java.lang.UnsatisfiedLinkError

    Posted 02/03/14 04:18 PM

    Originally posted by: M9HC_Keith_Hermiz


    Thank you, Daniel. 

    I have it working, sort of, but I don't know why.

    I added the explicit path to the JVM into the eclipse.ini to be sure that the library and JVM were consistent. I established a DYLD_LIBRARY_PATH. I've left the path specification in the VM arguments. 

    SInce the exercise was to get familiar with cplex I'm not going to explore this any further unless it breaks again.  

    Cheers.

     


    #CPLEXOptimizers
    #DecisionOptimization