Ask Your Question

Exception in thread "main" java.lang.NoClassDefFoundError: org/opencv/core/Core

asked 2019-07-28 17:46:14 -0500

Hi, I was doing a tutorial from here: "" But the console from eclipse shows me:

image description

i tried many things:

1.- Change from "System.loadLibrary(Core.NATIVE_LIBRARY_NAME)" to "System.loadLibrary("opencv_java2411.dll")"

2.-Change version of OpenCv, i tried 343 and 2311 version.

3.-Change from JDK 12 to JDK 8 and i get the same error.

4.-Change java version, i tried java 1.7 and got an error with reference a main function no exist.

i'm new in java, so maybe i'm lossing something important into configuration or installation, or other thing.

PD: Im just getting error with Opencv codes, i tried a simple code with only java resources and it works fine.

Please, help.

edit retag flag offensive close merge delete


Hmm this is a ClassNotFoundException - not a linkage error or anything, so your code from above wil not change anything. Most likely your opencv jar is not on the classpath- please check

holger gravatar imageholger ( 2019-07-29 03:40:07 -0500 )edit

You have correct, that solve my question.

Thanks :)

Ardillatactica gravatar imageArdillatactica ( 2019-07-30 13:48:07 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2020-06-25 05:17:58 -0500

I have the same error ! How do you fix the problem??

edit flag offensive delete link more


Read the comments from above - put the opencv jar on classpath.

holger gravatar imageholger ( 2020-06-25 08:33:29 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-07-28 17:46:14 -0500

Seen: 1,156 times

Last updated: Jul 28 '19