I compiled OpenCV on Linux (Mint 19 Tara), I used this tutorial: https://docs.opencv.org/2.4/doc/tutorials/introduction/desktop_java/java_dev_intro.html
Then I tried to use the library like that: https://docs.opencv.org/3.4/d1/d0a/tutorial_java_eclipse.html
But in the imports I get an error: "The import org cannot be resolved."
What can I do wrong? Here is the code I used:
package com.thegergo02.facedetection;
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
public class Hello
{
public static void main( String[] args )
{
System.loadLibrary( Core.NATIVE_LIBRARY_NAME );
Mat mat = Mat.eye( 3, 3, CvType.CV_8UC1 );
System.out.println( "mat = " + mat.dump() );
}
}
The compile was successful, no errors, i had Java, Ant, everything.
Java version: jdk-11.0.1 Ant version: 1.10.3
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);