I a newbie in java, I wanna try google or-tools for vehicle routing problem
Just try to run java example from here
But I got this exception: java.lang.UnsatisfiedLinkError: no jniortools in java.library.path
There is a line of code which load system lib "jniortools". But I don't know where to get that lib.
I'm using mac osx.
Any ideas?
OR-Tools is a C++ library with wrapper in Java using SWIG (which do JNI call etc...). I.e. this is a native library not a "pure" java lib...
So to use ortools in java you must tweak the java.library.path
e.g. when using ortools from source and running a program from root_dir
:
make third_party
make java
java -Djava.library.path=lib -cp objs:lib/com.google.ortools.jar:lib/protobuf.jar Program
note: ortools depends on protobuf.jar (which is compiled by ortools makefile third_party target rules)
documentation: https://developers.google.com/optimization/introduction/run_programs#running-the-java-example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With