bytedeco/javacv

Program won't compile with platform-specific requirement combined with javacv-platform dependency

Open

#1,961 opened on Dec 29, 2022

View on GitHub
 (4 comments) (0 reactions) (1 assignee)Java (1,583 forks)batch import
help wantedquestion

Repository metrics

Stars
 (6,985 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I'm programming this JavaFX application in Java 19 for which I also create a MSI file as installer. This works (packaging the Liberica SDK), but both the jar file as the installer (and also installed application) is very big then: around 1 GB.

I found the need to use the -Djavacpp.platform.windows-x86_64 option with mvn elsewhere on these javacv github pages to get only the platform-specific OpenCV and FFMPEG libraries packaged in the jar instead of all of them. This works when I use javacv 1.5.8 as dependency, but then when I run the installed program it gives the error mentioned at https://github.com/bytedeco/javacv/issues/1402

When I switch to javacv-platform 1.5.8 as dependency mvn will only compile my application successfully without the -Djavacpp.platform.windows-x86_64 option. With it I get a lot of missing dependencies:

Could not resolve dependencies for project :jar:0.0.1: The following artifacts could not be resolved: org.bytedeco:javacpp:jar:true:1.5.8, org.bytedeco:openblas:jar:true:0.3.21-1.5.8, org.bytedeco:opencv:jar:true:4.6.0-1.5.8, org.bytedeco:ffmpeg:jar:true:5.1.2-1.5.8, org.bytedeco:flycapture:jar:true:2.13.3.31-1.5.8, org.bytedeco:libdc1394:jar:true:2.2.6-1.5.8, org.bytedeco:libfreenect:jar:true:0.5.7-1.5.8, org.bytedeco:libfreenect2:jar:true:0.2.0-1.5.8, org.bytedeco:librealsense:jar:true:1.12.4-1.5.8, org.bytedeco:librealsense2:jar:true:2.50.0-1.5.8, org.bytedeco:videoinput:jar:true:0.200-1.5.8, org.bytedeco:artoolkitplus:jar:true:2.3.1-1.5.8, org.bytedeco:flandmark:jar:true:1.07-1.5.8, org.bytedeco:leptonica:jar:true:1.82.0-1.5.8, org.bytedeco:tesseract:jar:true:5.2.0-1.5.8: org.bytedeco:javacpp:jar:true:1.5.8

Especially the :true part seems weird to me and googling that (accompanied with one of these bytedeco jars) doesn't give me much either, so hopefully someone here can help me with my use case of needing to combine the javacv-platform dependency and the -Djavacpp.platform.windows-x86_64 option

Contributor guide