I’m preparing a workshop using Processing 4.02b, but OpenCV library seems to have an issue with permissions.
WARNING: Illegal reflective access by gab.opencv.OpenCV (file:/Users/Name/Documents/Processing/libraries/opencv_processing/library/opencv_processing.jar) to field java.lang.ClassLoader.sys_paths
WARNING: Please consider reporting this to the maintainers of gab.opencv.OpenCV
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
NullPointerException
This a java feature since java 11, but is normally (up to jdk11 at least) only a warning that you can ignore. Ideally you want the OpenCV library updated to module version that explicitly permits reflective access.
The problem is not the warnings themselves. The warnings are telling you the library is doing something it shouldn’t be. In this case, setting a private field to null in such a way that worked in JDK 8 and throws an exception in JDK 11 - the internal behaviour of ClassLoader has changed quite a bit.
However, I still got the error “A library used by this sketch relies on native code that is not available. UnsatisfiedLinkError: no opencv_java400 in java.library.path: :/Applications/Processing.app/Contents/Java/core/library/macos-x86_64:…”
Yes, I solved it by copying the file “libopencv_java400.dylib” to /Applications/Processing.app/Contents/Java/core/library
Of course, with updated library from above. Let me know if it fixed your case.