New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install OpenCV Java on Mac #25562
Comments
Hello, I'm not macOS user so this is only advice. I'm sorry. Install steps in this site are here. I read you had done step 2 and step 3.
Maybe it is ok, but please could you confirm your system has installed If it is OK, could you get CMake output ? -- General configuration for OpenCV 4.9.0-dev =====================================
-- Version control: 4.9.0-455-XXXXXXXX
--
:
:
--
-- Java:
-- ant: /usr/local/bin/ant (ver 1.10.12)
-- Java: NO
-- JNI: /usr/local/include /usr/local/include /usr/local/include
-- Java wrappers: YES (ANT)
-- Java tests: YES
-- OpenCV 4.x document seems to be slightly old... |
Yes, I've installed ant using 'brew install ant' its version: 1.10.14 |
How do I get the CMake output |
As first I said I have no macOS. So if it is incorrect, I'm sorry.
|
Here is the log file attached |
Thank you for getting log. This log has 4 "cmake -S" lines.
With only this result, it seems And I confirm OpenCV modules section. Java module is "Disabled", not "Disabled by dependency".
|
Hi, I was able to successfully get the build following this article: https://stackoverflow.com/questions/76097556/homebrew-on-mac-not-using-the-edited-opencv-rb-file-via-brew-edit-opencv-during. Getting opencv-490.jar file successfully. But the build is showing up on Java 21 although Java is set to 11 on my Mac, attaching the logs here. I tried setting the Java Home before running the process but no luck. the error is: class file has wrong version 65.0, should be 55.0 for file Imgcodecs.class Note: I need it to be on Java 11 |
OK, however this seems that question about your setting/environment, not OpenCV issue. |
OpenCV - 4.9.x (Latest)
MacOS - Ventura 13.6.4
ant: 1.10.14
I'm trying to install opencv with Java bindings on MacOS Intel. I'm following the steps from: https://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html#install-opencv-3-x-under-macos
As per the docs, changing this option to ON -DBUILD_opencv_java=OFF in -DBUILD_opencv_java=ON. Should do the job, but when I run "brew install --build-from-source opencv --verbose" in verbose mode it still takes it as OFF. Below is the screenshot
Here the screenshot of opencv file:
The text was updated successfully, but these errors were encountered: