Ask Your Question

Revision history [back]

Running a Java Program Referencing OpenCV's Jar File

I'm finding it impossible to run my program that's relying on the OpenCV jar file. I have compiled with "javac -cp opencv-300.jar *.java", but trying to run java Program meant it couldn't find the main class, so I ran with java Program.Program which threw exceptions regarding finding the OpenCV classes.

I tried java "-Djava.library.path=". -jar opencv-300.jar but that only returned "no main manifest attribute, in opencv-300.jar". I tried uncompiling the jar and running with java -cp . Program.Program and it returned "UnsatisfiedLinkError: no opencv_java300 in java.library.path", but that seems like a terrible path.

Does anybody have any clue how I can make the damn thing run? Trying on Windows 8 and Ubuntu 14.04LTS, with identical results on both. Please help!

Edit: I can upload a public Dropbox link so people can see for themselves if that would help.