Closed coachwei closed 7 years ago
From #3:
jpostal builds shared object files (.so on Linux, .jniLib on Mac) that also need to be on java.library.path (after you run gradle assemble the .so files can be found in src/main/jniLibs
in your checkout dir). For running the tests, we set this explicitly here.
If you use gradle, there's a plugin called gradle-natives that may be helpful: https://github.com/cjstehno/coffeaelectronica/wiki/Going-Native-with-Gradle
Thanks for the reply.
It turns out setting java system property inside Java code may not work for java.library.path variable as it is really a "read-only" variable.
Here is a link for reference purpose: How to set java.library.path within Java code
Right, that's why we set it in the gradle build, not in Java.
When running test java code, got the following error (I added a "main" method to the TestAddressParser class):
Looks like that I need to set up the java.library.path (I checked this property. None of the directories that it points to have the libpostal library). What should I set to the java.library.path variable?
( I did built/installed libpostal and jpostal following the instructions on https://github.com/openvenues/jpostal)