Hello,
I'm trying to use or-tools from Java, but am not successful yet. I hope you can help me.
According
https://code.google.com/p/or-tools/wiki/OrToolsWithJava, I downloaded and unzipped the Google.OrTools.java.VisualStudio2013-64b.3750.zip distribution.
To my knowledge, the important components needed to run samples are located in the lib folder, and these are
- com.google.ortools.jar
- jniortools.dll.
In eclipse, I created a Java project, added com.google.ortools.jar as referenced library, and copied jniortools.dll to C:\Windows (Also tried it in the eclipse project's root folder, that that was no difference).
Then I copied the NQueens.java sample to my project. The project compiles without errors, so com.google.ortools.jar seems to be referenced correctly.
However, when I run the NQueens.main() then I get an UnsatisfiedLinkError error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Windows\jniortools.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1087)
at try_ortools.NQueens.<clinit>(NQueens.java:23) Apparently, I'm missing some dll's that are used by jniortools.dll?
In another post, I saw a reference to msvcp100.dll and msvcr100.dll, but both are present in my C:\Windows folder.
Any suggestion about what I am missing?