your cmdline does not link opencv-java.jar, also you need something like this in Main() to load the jni bindings: