eclipse控制台消息:no jniopencv_core in java.library.path
今天在这个问题上折腾了好久好久,查找了好多文档,主要是看http://answers.opencv.org/question/8288/opencv-244-in-javalibrarypath-error/ 这个网站主要解决的不是这个问题,但是还是有些许作用。
主要参考:http://www.opendebug.com/article/540720
Seeking solutions! ------ Best solution -------------------------------------------------------- I also encountered this problem, but I was OpenCV version 2.1 so there has always been this problem, but then I replaced with the OpenCV version 2.4.2, and you, and then you can. I said middle note: First, make sure Java and OpenCV is installed the same version (32-bit or 64-bit), and should not be mixed in any case. Second, you have to determine their own project inside a folder libs placed inside javacpp.jar, the javacv.jar, javacv-windows-x86.jar three jar package, and then add these jar files to the project inside is inside the java build path to click ADD JARs, and then select the three packages added to the project to go inside. Finally, the best OpenCV2.4.2 unpacked in the root directory of C. Set the system variable PATH (C:opencvbuildx86vc10bin). These two do a good job should be no problem. ------ Other solutions -------------------------------------------------------- Bangding, the same problem Say this is the version of the problem?But did not find the answer ------ Other solutions -------------------------------------------------------- Doing later in javacv official website to find the answer to the lack of C ++ runtime environment install
经过尝试,我发现我的问题主要是上面所说的第二个,版本问题。因为在eclipse控制台消息的下半部分有一句:cause by ……no opencv_core245
此时我装的是opencv2.4.4,然后不得不重新装opencv2.4.5版本。进行配置:http://blog.csdn.net/haoba1987/article/details/8175390(参考)
首先我自己写了一段代码,查看java.library的位置:System.out.println(System.getProperty("java.library.path"));
找到自己本地的java.library.path,假设为X。然后把opencv_core245.dll放到X目录下,再进行调试,之后又会出现说缺什么什么文件,你就在opencv里面找到
这些文件,一一放到X下,这就ok了。