After Windows Build from source - Java Unsatisfied Link Error

asked 2015-11-20 09:54:18 -0600


I downloaded source from github and build it on Ubuntu 14.04 64 bit and Windows 7 64 bit.

At linux side it is working and i saw that the problem of rendering H.264 video stream at high resolutions like 1920x1080 was solved. (Code change was : FFMPEG & GSTREAMER decoding through getting the frame with underlaying protocol TCP and null frame control)

But at Windows side although the build is okay on Visual Studio 2013 and the INSTALL project output seems true like below (i compared the folder structure with 2.4.9's and 2.4.11's binary windows distributions), it gives always "Java Unsatisfied link error : opencv_java2412.dll can't find dependednt libraries)

image description

image description

image description

All required *.dll, *.lib files exist in bin and lib folders. I am sure about setting the -Djava.library.path as true because if you give the path wrong it gives another error like (nonative library found for opencv_2412)

So, does anybody have opinion about this situation? Did anybody try the compilation of at Windows side?

Regards, Eray

edit retag flag offensive close merge delete


I compared the jni_part.cpp of with and saw that first load of library mechanism changed as below :

JNI_OnLoad(JavaVM* vm, void* )
    JNIEnv* env;
    if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
        return -1;

// Change starts here...
    bool init = true;
    init &= cv::initModule_nonfree();
    init &= cv::initModule_features2d();
    init &= cv::initModule_video();
    init &= cv::initModule_ml();
    init &= cv::initModule_contrib();

        return -1;

May be related to this. Investigation is continuing. Any help will be acceptable..:)

erohan gravatar imageerohan ( 2015-11-23 05:17:41 -0600 )edit