I have more than one class loader:
- a logical classloader (using URLClassLoader)
Java on Windows, OpenCV version 4.5.2
the jar is in the classpath, the DLL in the path.
Loading the library succeeds
but when I’m trying to use the APIs the link is unsatisfied.
Mat findFace = Imgcodecs.imread("C:\\image.jpg");
after closer look I noticed that
loadLibrary uses classloader of the caller class
but, the APIs are relying on SystemClassloader.
In debug I managed to make it working by evaluating the following statement
[00:28] Ivan Kostyuk
I did this in debug to prove it is working
This is ugly and cannot be implemented as a workaround, due to the field
nativeLibraries has default visibility and it is really ugly.
I think it is an issue with OpenCV.
Could you recommend me the next step to get it resolved?