Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[Question/Java/Help] how to get openCV to run in a jar?

So I've been trying for a really long time to get my program to run in a jar file through cmd and I kept getting the error: "exception in thread main java.lang.unsatisfiedlinkerror no opencv in java.library.path" with some extra bits of unneeded code. I fixed that part by putting the .dll files in a resource folder and reading them through with the following code:"inputStream = LoadOpenCv.class.getResourceAsStream("/opencv/windows/x64/opencv_java341.dll");" and it fixed that problem. My newest problem is that it does not read or connect to the IP camera that I am using to test it. When I run it in netbeans everything works fine, but if I run it as a jar file by clicking on it or using java -jar {programname}.jar it returns a blank popup(where the output of the camera would be). Any information or help you can give me is deeply appreciated and would really help me out. Thank you! This is the program I am using to test it( so I know it's not the bugs in my program that may cause the issue) https://ratiler.wordpress.com/2014/09/08/detection-de-mouvement-avec-javacv/

[Question/Java/Help] how to get openCV to run in a jar?

So I've been trying for a really long time to get my program to run in a jar file through cmd and I kept getting the error: "exception in thread main java.lang.unsatisfiedlinkerror no opencv in java.library.path" with some extra bits of unneeded code. I fixed that part by putting the .dll files in a resource folder and reading them through with the following code:"inputStream = LoadOpenCv.class.getResourceAsStream("/opencv/windows/x64/opencv_java341.dll");" and it fixed that also using file output stream to load it into the program i was able to fix the problem. My newest problem is that it does not read or connect to the IP camera that I am using to test it. When I run it in netbeans everything works fine, but if I run it as a jar file by clicking on it or using java -jar {programname}.jar it returns a blank popup(where the output of the camera would be). Any information or help you can give me is deeply appreciated and would really help me out. Thank you! This is the program I am using to test it( so I know it's not the bugs in my program that may cause the issue) https://ratiler.wordpress.com/2014/09/08/detection-de-mouvement-avec-javacv/