Ask Your Question
0

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

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

Hi, I was doing a tutorial from here: "https://docs.opencv.org/3.4/d1/d0a/tu..." 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

Comments

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 -0600 )edit

You have correct, that solve my question.

Thanks :)

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

1 answer

Sort by ยป oldest newest most voted
0

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

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

edit flag offensive delete link more

Comments

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

holger gravatar imageholger ( 2020-06-25 08:33:29 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 4,068 times

Last updated: Jul 28 '19