V
V
Vanes Ri_Lax2020-04-07 15:12:30
Java
Vanes Ri_Lax, 2020-04-07 15:12:30

Why does it give an error when starting the program?

I wrote a simple code:

import org.opencv.core.*;

public class Main {
    static {
        System.loadLibrary(Core.NATIVE_LIBRARY_NAME); //ругается на эту строку
    }
    public static void main(String[] args) {
        System.out.println(Core.VERSION); 
        System.out.println(Core.VERSION_MAJOR);
        System.out.println(Core.VERSION_MINOR);
        System.out.println(Core.VERSION_REVISION);
        System.out.println(Core.NATIVE_LIBRARY_NAME);
        System.out.println(Core.getBuildInformation());
    }
}

The program ends with an error:
java.lang.UnsatisfiedLinkError: no opencv_java430 in java.library.path
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
  at java.lang.Runtime.loadLibrary0(Runtime.java:870)
  at java.lang.System.loadLibrary(System.java:1122)
  at Main.<clinit>(Main.java:6)
Exception in thread "main" C:\Users\VaneS\AppData\Local\NetBeans\Cache\11.3\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\VaneS\AppData\Local\NetBeans\Cache\11.3\executor-snippets\run.xml:94: Java returned: 1
BUILD FAILED (total time: 0 seconds)

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2020-04-07
@vanesxl

Have you tried searching on Google?
Here is the search result - https://stackoverflow.com/questions/27088934/unsat...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question