Itseez/opencv — pull request #31 by emchristiansen (2012-09-14 06:27:34+00:00)
Title: Adds support for desktop Java

Support for desktop Java can now be enabled using the "JAVA"
flag; e.g. "cmake -DJAVA=1 ..". This builds libopencv_java.so, which
contains the native side of the interface, as well as OpenCV.jar, which
contains the Java side of the interface.

Nice features:
1) The generated OpenCV.jar has attached source. This enables nice navigation
in IDEs like Eclipse.

To use:
1) The Java library search path must include the directory containing
libopencv_java.so. This is most easily set in Linux via the LD_LIBRARY_PATH
environment variable.
2) The Java project should be built against OpenCV.jar.
3) Before using any OpenCV functions, your Java code must load libopencv_java.so.
This can be done by calling 'System.loadLibrary("opencv_java")'.

Issues:
1) I have only tested this on my 64-bit Ubuntu machine.

Meta:
This is my first time mucking around in the OpenCV build system. If I'm doing something in a nonstandard way, please let me know and I'll update the code.