Ask Your Question

zachkerr0987's profile - activity

2015-10-15 00:09:38 -0600 asked a question 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.

2015-10-14 23:04:05 -0600 received badge  Editor (source)
2015-10-14 09:34:25 -0600 asked a question How to Compile Using .jar?

I'm trying to compile on the command line using the opencv-300.jar file. It compiles fine, but once trying to run the program it begins to throw ClassNotFoundExceptions. The command I'm using is the following: javac -cp opencv-300.jar Program.java, etc.. Is there something incorrect in the way I've linked the jar file for OpenCV? I used Netbeans to write the program, and included the .jar in libraries no problem. I'm running Windows 8 if that makes any difference.

Edit: Running java "-Djava.library.path=". -jar opencv-300.jar returns the following error: no main manifest attribute, in opencv-300.jar