-
Hello, I work on Hydraulic Conveyor which is a program that can build self-updating app packages for Windows, macOS and Linux. It has deep support for JVM apps, meaning you can just supply it with some JARs, run a local build and it spits out a static website with fully code signed, notarized and auto-updating downloads. It will hopefully make it much easier and more convenient to distribute JVM apps both on client and server, and that will hopefully benefit everyone using JavaCV and JavaCPP. It's free for open source projects. A customer has reported that an app using JavaCV doesn't package correctly. The error is:
And sure enough,
So, a bunch of advantages to doing things this way. On investigation, it appears that JavaCPP has a rather featureful and complex JNI loader. The It seems that this library is special in some way and inability to load it crops up in various bug reports with various different causes. Obviously this time it's a new cause. From some reading and grepping, my guess is that this library is 'special' due to the fragments, which looks like some sort of aliasing mechanism. In the decompiled class file for this library we can see:
That looks an awful lot like Finally (phew!) we reach my actual questions :-)
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 27 replies
-
@HGuillemet @johanvos @HannesWell @reckart @timothyjward are facing similar issues with other frameworks like Android and OSGi, so let's bring them in the discussion. The only standard loading mechanism that OpenJDK is willing to offer is jlink, which does not actually fulfill user requirements to any meaningful extent, so we still all need to come up with our own disparate hacks. JavaCPP is no different. However, it does fall back on Now, the case of OpenBLAS is a bit special. It provides a standard implementation of BLAS and LAPACK, but to let users switch to a different implementation at runtime, JavaCPP can create links to those offered by MKL, Accelerate, etc that may be installed on the system. Although MKL provides an implementation of LAPACK, Accelerate does not. So applications that do not need LAPACK should use the API exposed by |
Beta Was this translation helpful? Give feedback.
-
I indeed worked on this problem for the same 5 reasons you mention.
Have a look at the README in the github repos and see if they can help you. |
Beta Was this translation helpful? Give feedback.
@HGuillemet @johanvos @HannesWell @reckart @timothyjward are facing similar issues with other frameworks like Android and OSGi, so let's bring them in the discussion. The only standard loading mechanism that OpenJDK is willing to offer is jlink, which does not actually fulfill user requirements to any meaningful extent, so we still all need to come up with our own disparate hacks. JavaCPP is no different. However, it does fall back on
System.loadLibrary()
, so if your framework is able to place all the required libraries such thatSystem.loadLibrary()
succeeds, then JavaCPP will be happy. We don't usually need to know anything more than that, so there isn't any detailed documentation about…