user2001478
user2001478

Reputation: 41

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

When I compile, I receive the following notes:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

then I use the following command to run:

java -Djava.library.path=/usr/local/cplex/ILOG/CPLEX_Studio_AcademicRsearch122/cplex/bin/x86-64_sles10_4.1/ -cp lib/jade.jar:lib/jxl.jar:lib/commons-logging-1.1.jar:lib/junit-3.8.1.jar:lib/log4j-1.2.13.jar:lib/poi-3.8-20120326.jar:lib/cplex.jar:classes jade.Boot -gui

it returns:

java.lang.UnsatisfiedLinkError: no cplex122 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=...

I am very confusing, cause I did include the path already. The path is right, I use the same path to run other program, and it works. What problem it will be? thanks.

Upvotes: 2

Views: 2765

Answers (1)

Delfic
Delfic

Reputation: 167

I had the same problem.

You need to run the application with a JRE with the same architecture as the cplex lib. In my case I was using a 32-bit cplex lib with a 64-bit JRE.

Try installing another JRE with a different architecture and then re-run your program with this other JRE.

Hope this helps

Upvotes: 0

Related Questions