Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+32 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 (8 points)

2 Answers

+15 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 (8 points)
selected by
+7

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

Thanks!

+12 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 (8 points)
+6

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

...