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

martinschneider opened this issue Apr 25, 2019 · 1 comment


None yet
2 participants
Copy link

commented Apr 25, 2019

When calling OpenCV.loadShared();:

	at nu.pattern.OpenCV$SharedLoader.getInstance(
	at nu.pattern.OpenCV.loadShared(

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

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

Is this a known issue?


This comment has been minimized.

Copy link

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.


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.