0

I install the 4.1.0 version of OpenCV on MacOS (Version 10.12.6) with the following command :

brew install --build-from-source opencv

After that I get my .jar file and I added it to my netbeans project. And I get the following error :

Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java410 in java.library.path

when I try this code :

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
Mat mat = Mat.eye(3, 3, CvType.CV_8UC1);
System.out.println("mat = " + mat.dump());

I already search what I can add to the VM options but I don't found it.

Thanks for your help !

1 Answer 1

1

The error you recieve, says something like it could not find the opencv.jar file on your current location. You must eighter move the jar file and the dynalink file to the a folder included in java.library.path. Or add the folder to the java.library.path.

this link has an explanaiton of how to do it.

https://examples.javacodegeeks.com/java-basics/java-library-path-what-is-it-and-how-to-use/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.