Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+35 votes

We're getting this error:
Exception in Application start method
java.lang.reflect.InvocationTargetException
(at ...)
Caused by: java.lang.RuntimeException: Exception in Application start method
(at...)
Caused by: java.lang.UnsatisfiedLinkError: org.opencv.videoio.VideoCapture.VideoCapture_3()J
(at...)
at application.Main.start(Main.java:14)
(at...)
Exception running application application.Main

It happens when we press the run button on the main class. So we can't even get the gui to run because Main.java: 14 is literally the first line in the try block.

asked in CSC285_Fall2018 by (1 point)

2 Answers

+16 votes
 
Best answer

I'm wondering whether you have added the line System.loadLibrary(Core.NATIVE_LIBRARY_NAME); in the main method or not since it was one of the reasons why our very first example of openCV (the one that we did in class last week trying to load an image) didn't work.

Also, take a look at your "import" code because I think what should be included in Main.java, for example, is import org.opencv.core.Core; instead of org.opencv.videoio.VideoCapture.VideoCapture_3() like your error above...

answered by (1 point)
selected by
+8

We tried moving it and a couple of other things (like initializing the VideoCapture in the data field section) and it somehow worked.

Thanks!

+13 votes

Did you encounter this problem before during lab 3?
I've never encountered it but you may try to copy the original codes from gitHub and see if it still has the same problem...

answered by (1 point)
+7

No we hadn't gotten it before. Stonedahl ended up helping us and it probably came from what Tiffany said. Thanks though

...