-
I'm working on what is effectively a new javacpp-presets for sane, which is readily available from most Linux distro repositories. In addition to the core libsane.so back-end there are numerous manufacturer specific modules, and, some manufacturers publish their own proprietary modules as well, the packaging and distribution of which would violate their licensing. Unfortunately, the proper way to prevent the packaging of libsane.so, which subsequently never manages to find the other modules, is not clear to me. Even when I don't build from source, and simply point to the system shared library, libsane.so gets copied to Right now I'm using this configuration in presets
I should mention that I'm building with maven and presume that something additional is required in the pom.xml for a packaging goal at the very least, but it's also not clear what's required so the loader will find and load the sane library from it's native location, which in turn allows it to find and load it's optional children. It's also desirable to detect a missing sane package and give a friendly message about making sure it's loaded in place of the less helpful UnsatisfiedLinkError messages someone would need to interpret, but first things first. -TIA |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
JavaCPP will look for libraries in the normal java.library.path for JNI libraries, so the easiest thing to do is too make sure that java.library.path contains the libraries you wish to load. If that doesn't work, please set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console. |
Beta Was this translation helpful? Give feedback.
-
To prevent copying libraries in the case of the Maven plugin, we can set copyLibs to false, for example: |
Beta Was this translation helpful? Give feedback.
To prevent copying libraries in the case of the Maven plugin, we can set copyLibs to false, for example:
https://github.com/bytedeco/javacpp-presets/blob/master/flycapture/pom.xml#L49