Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elaborate on how to use this with Java 17 #79

Open
charlesritchea opened this issue Dec 1, 2021 · 5 comments
Open

Elaborate on how to use this with Java 17 #79

charlesritchea opened this issue Dec 1, 2021 · 5 comments

Comments

@charlesritchea
Copy link

Now that loadShared is essentially deprecated, and I assume many people using that method, like myself, have no idea how to get the exact version of opencv needed built in their Dockerfile to be used by loadLocally. Can we get an example Dockerfile or any further instructions on how to setup an environment that works with loadLocally. Maybe I'm dumb, but I don't understand what is needed from just the current README

@fighttiger25
Copy link

Hi, @charlesritchea , did you solve the problem in the end? I encountered the same problem these days.

@charlesritchea
Copy link
Author

Yeah it ended up being stupidly simple I think it's just to call loadLocally, I'll put the code here when I get back

@charlesritchea
Copy link
Author

@fighttiger25 it was just this:

    OpenCV.loadLocally()

@charlesritchea
Copy link
Author

I thought I had to load the specific native library, but this just does it automatically from the library bundled in the maven dependency

@fighttiger25
Copy link

fighttiger25 commented Dec 8, 2022

Thanks for your quick response! May I ask you about the version of JRE and OpenCV you used?
My JRE crashed after successfully loading the library OpenCV.loadLocally() and printing out the OpenCV version.
The log is as follows:

OpenCV 4.5.5
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000000020e936, pid=1, tid=135
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.4.1+1 (17.0.4.1+1) (build 17.0.4.1+1)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (17.0.4.1+1, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
 # Problematic frame:
 # C  0x000000000020e936`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants