Git Product home page Git Product logo

Comments (7)

vonnieda avatar vonnieda commented on July 4, 2024 3

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.

vonnieda avatar vonnieda commented on July 4, 2024

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.

Maurice-Mueller avatar Maurice-Mueller commented on July 4, 2024

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.

rlking avatar rlking commented on July 4, 2024

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.

AuligPromotions avatar AuligPromotions commented on July 4, 2024

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.

martinschneider avatar martinschneider commented on July 4, 2024

Thanks a lot for fixing this!

from opencv.

vonnieda avatar vonnieda commented on July 4, 2024

from opencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.