Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse: java.lang.UnsatisfiedLinkError

I'm working on javacv project but every time I try to declare a matrix as below:

Mat trainingData = new Mat();

I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat()J
at org.opencv.core.Mat.n_Mat(Native Method)
at org.opencv.core.Mat.<init>(Mat.java:447)

And when i search for a solution, i always found that i have to add:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

But i'm always having the same error.

like image 514
Synda Avatar asked Oct 31 '22 02:10

Synda


1 Answers

The UnsatisfiedLinkError is thrown at runtime when an application attempts to load a native library and that library does not exist.

It sounds like something went wrong when attaching your library or your library was not set up correctly in your IDE.

See: http://docs.opencv.org/doc/tutorials/introduction/java_eclipse/java_eclipse.html#java-eclipse

like image 83
VILLAIN bryan Avatar answered Nov 15 '22 04:11

VILLAIN bryan