Comments (7)
I have some changes in the works that will hopefully solve this problem permanently. I am looking at changing how the library is loaded to the same method that JNA uses, and this should remain compatible across JDK updates.
from opencv.
Hi @martinschneider, no, this isn't a known problem. This library tends to be a little bit fragile when it comes to new Java versions, so there is probably some tweaks that need to be made. If you are able to come up with a compatible fix that would be very welcome! Otherwise, I will look at this as soon as I have some time.
Thanks,
Jason
from opencv.
The same error for me. When I'm testing with OpenJDK 10 it is loading but I get the following warning:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by nu.pattern.OpenCV$SharedLoader (file:/home/maurice/.gradle/caches/modules-2/files-2.1/org.openpnp/opencv/3.4.2-1/fbd8f36fd1ce4e2bf0dcb12befd7d4cfc74d8d35/opencv-3.4.2-1.jar) to field java.lang.ClassLoader.usr_paths
WARNING: Please consider reporting this to the maintainers of nu.pattern.OpenCV$SharedLoader
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
OpenJDK 64-Bit Server VM warning: You have loaded library /tmp/opencv_openpnp2599240055310010051/nu/pattern/opencv/linux/x86_64/libopencv_java342.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
from opencv.
Instead of OpenCV.loadShared();
you can use OpenCV.loadLocally();
if it's appropriate for your project. In JDK10+ they restricted the reflective access so it won't work anymore.
from opencv.
I get the same error on Java 11.0.3. Problem is I need to use Java 11, so any ideas on how to fix this?
from opencv.
Thanks a lot for fixing this!
from opencv.
from opencv.
Related Issues (20)
- Should the License be Changed to Apache v2 for OpenCV version 4.7?
- videoCapture.isOpened() always is false! HOT 4
- Opencv 4.8.1 and BarcodeDetection
- libwebp cve-2023-4863 HOT 1
- Memory Leak with some functions HOT 2
- Java 11 requirement HOT 1
- OpenCV.loadLocally() init error HOT 2
- Caused by: java.lang.UnsatisfiedLinkError: /tmp/opencv_openpnp5364447482759473585/nu/pattern/opencv/linux/x86_64/libopencv_java460.so: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/opencv_openpnp5364447482759473585/nu/pattern/opencv/linux/x86_64/libopencv_java460.so) HOT 2
- platform specific binaries/artifacts HOT 1
- Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java490 in java.library.path HOT 3
- Long delay when opening camera 0
- update with 4.10.0 HOT 1
- Impossible to load library on Mac OS X HOT 1
- 4.7.0 Version HOT 1
- BarcodeDetector HOT 4
- Extra modules HOT 1
- Class CaptureDelegate is implemented in both HOT 2
- version 4.8.0
- Project runs on M2 Mac but fails on x86 Linux HOT 1
- Setting VideoCapture to certain square resolutions results in garbled output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.