Ask Your Question

Revision history [back]

Opencv430.jar was not created after cmake

So i was building Opencv 4.3. on my Ubuntu 20.04 and followed the Tutorials: Installation on Linux & Introduction to Java Development. I get a build, but Opencv430.jar is no created. Here is the cmake output:

Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find Atlas (missing: Atlas_CBLAS_INCLUDE_DIR Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY 
Atlas_BLAS_LIBRARY Atlas_LAPACK_LIBRARY) 
Could NOT find BLAS (missing: BLAS_LIBRARIES) 
LAPACK requires BLAS
A library with LAPACK API not found. Please specify library location.
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher

  OpenCV modules:
    To be built:                 calib3d core features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching ts video videoio
    Disabled:                    python_bindings_generator python_tests world
    Disabled by dependency:      -
    Unavailable:                 dnn java js python2 python3
    Applications:                apps
    Documentation:               NO
    Non-free algorithms:         NO

  Java:                          
    ant:                         NO
    JNI:                         /usr/lib/jvm/java-14-openjdk-amd64/include /usr/lib/jvm/java-14-openjdk-amd64/include/linux /usr/lib/jvm/java-14-openjdk-amd64/include
    Java wrappers:               NO
    Java tests:                  NO

So, Java is unavailable, because ant is missing. Which is strange, because it is installed. I checked the enviroment variable and got /usr/bin/ant. Thought the link was to blame and made it explicit. Change the $ANT_HOME to /usr/share/ant/bin

What do i need to do to get a build, that has the Java Module?