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

Error "Failed to get field handle to set library path" when using Java 12 #44

Open
martinschneider opened this issue Apr 25, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@martinschneider
Copy link

commented Apr 25, 2019

When calling OpenCV.loadShared();:

java.lang.ExceptionInInitializerError
	at nu.pattern.OpenCV$SharedLoader.getInstance(OpenCV.java:232)
	at nu.pattern.OpenCV.loadShared(OpenCV.java:181)

Caused by: java.lang.RuntimeException: Failed to get field handle to set library path
	at nu.pattern.OpenCV$SharedLoader.addLibraryPath(OpenCV.java:258)
	at nu.pattern.OpenCV$SharedLoader.<init>(OpenCV.java:206)
	at nu.pattern.OpenCV$SharedLoader.<init>(OpenCV.java:187)
	at nu.pattern.OpenCV$SharedLoader$Holder.<clinit>(OpenCV.java:228)

I think the problem lies in this line but I'm not entirely sure how to fix it.

Is this a known issue?

@vonnieda

This comment has been minimized.

Copy link
Member

commented May 10, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.