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