{"id":357,"date":"2022-08-30T15:00:00","date_gmt":"2022-08-30T15:00:00","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/06\/opencv-java-exception-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:00:00","modified_gmt":"2022-08-30T15:00:00","slug":"opencv-java-exception-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/opencv-java-exception-collection-of-common-programming-errors\/","title":{"rendered":"Opencv Java exception-Collection of common programming errors"},"content":{"rendered":"<p>Hello I&#8217;m getting next exception when trying to run java project that uses opencv libraries:<\/p>\n<pre><code>Exception in thread \"main\" java.lang.UnsatisfiedLinkError: no opencv_java in java.library.path\nat java.lang.ClassLoader.loadLibrary(Unknown Source)\nat java.lang.Runtime.loadLibrary0(Unknown Source)\nat java.lang.System.loadLibrary(Unknown Source)\nat org.opencv.highgui.Highgui.(Highgui.java:416)\nat teste.main(teste.java:21)\n<\/code><\/pre>\n<p>Can it be caused of wrong installation of opencv? Or maybe some import is missing? I&#8217;m trying to follow instructions from here. Also I&#8217;m using Windows 7 and I want to create a simple Java project in Eclipse(not Android)<\/p>\n<ul>\n<li>So I&#8217;ve extracted javacv from OpenCV-2.4.2.exe file to C:\\<\/li>\n<li>Then executed &#8220;cmake -G &#8220;MinGW Makefiles&#8221; -DBUILD_opencv_java=ON C:\\opencv&#8221; command and after that, &#8220;mingw32-make&#8221;. Everything was build without errors or warnings<\/li>\n<li>After I&#8217;ve added opencv dll&#8217;s to my Environment Variables<\/li>\n<\/ul>\n<p>Thanks for your attention<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-06 03:16:16. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Hello I&#8217;m getting next exception when trying to run java project that uses opencv libraries: Exception in thread &#8220;main&#8221; java.lang.UnsatisfiedLinkError: no opencv_java in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at org.opencv.highgui.Highgui.(Highgui.java:416) at teste.main(teste.java:21) Can it be caused of wrong installation of opencv? Or maybe some import is missing? I&#8217;m trying to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}