opencv wrongly detects Java as installed on Mac OS X 10.7+ (Bugfix #2903)
Description
Mac OS X 10.7 and newer don't come with Java installed. They do include some stub binaries, which ask the user if they want to install Java when run.
OpenCV's cmake script just checks for the existence of an ant binary and appears to assume that Java's available if ant is. As a result, cmake will configure the build to use Java and it will fail once it tries to compile the Java bindings.
This can be fixed by checking for the exit status of `ant -version` - it'll exit 0 if Java is installed, or 1 otherwise.
The user who reported this to me provided the attached patch.
Associated revisions
Merge pull request #2903 from mmaraya:2.4
History
Updated by Daniil Osokin almost 12 years ago
Thanks for attention! Please, contribute a pull request (http://code.opencv.org/projects/opencv/wiki/How_to_contribute) with this bugfix. It will speedup fixing in many times!
- Tracker changed from Bug to Bugfix
Updated by Daniil Osokin almost 12 years ago
- Assignee changed from Andrey Kamaev to Misty De Meo
Updated by Daniil Osokin almost 12 years ago
Great! Many thanks for contribution!
- Pull request set to https://github.com/Itseez/opencv/pull/694
Updated by Andrey Kamaev almost 12 years ago
Fix is merged to code base.
- Target version set to 2.4.5
- Status changed from Open to Done