back to home

bytedeco / javacpp-presets

The missing Java distribution of native C++ libraries

View on GitHub
2,839 stars
752 forks
295 issues

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing bytedeco/javacpp-presets in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/bytedeco/javacpp-presets)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

JavaCPP Presets =============== Build status for all platforms (Android, iOS, Linux, Mac OS X, Windows): Commercial support and paid services for custom presets: Introduction ------------ The JavaCPP Presets modules contain Java configuration and interface classes for widely used C/C++ libraries. The configuration files in the packages are used by the to create from C/C++ header files the Java interface files targeting the packages, which in turn are used by the and the native C++ compiler to produce the required JNI libraries. Moreover, helper classes make their functionality easier to use on the Java platform, including Android. For orientation purposes, the documentation of this repository can be thought of as being split into 2 levels:• The directory where this parent README.md document is located belongs to the upper level, the module itself, and• The subdirectories in it are the actual child modules, with their README.md files, presets, and packages, as the lower level. This parent README.md file contains general information applicable to all modules to solve issues concerning downloads, common requirements, installation procedures, and build instructions. The respective README.md files in each subdirectory contain extra information, links, and notes concerning API documentation, specific requirements, dependencies for files, and sample usage code, for the presets and packages of each module. Please be aware that not all of the presets have the same level of maturity, and the style and layout may also differ from one to another since they are based on the APIs of third-party libraries. Please refer to the wiki page for more information about how to create new presets. Since additional documentation is currently lacking, please also feel free to ask questions on the mailing list or the discussion forum. Downloads --------- JAR files containing binaries for all child modules and builds for all supported platforms (Android, iOS, Linux, Mac OS X, and Windows) can be obtained from the Maven Central Repository. Archives containing these JAR files are also available as releases. To install manually the JAR files, follow the instructions in the Manual Installation section below. We can also have everything downloaded and installed automatically with:• Maven (inside the file)• Gradle (inside the or file)• Leiningen (inside the file)• sbt (inside the file) where the and variables correspond to the desired module. This downloads binaries for all platforms, but to get binaries for only one platform we can set the system property (via the command line option) to something like , , , , etc. We can also specify more than one platform, see the examples at Reducing the Number of Dependencies. Another option available to Gradle users is Gradle JavaCPP, and similarly for Scala users there is SBT-JavaCPP. Required Software ----------------- To use the JavaCPP Presets, you will need to download and install the following software:• An implementation of Java SE 8 or newer:• OpenJDK http://openjdk.java.net/install/ or• Oracle JDK http://www.oracle.com/technetwork/java/javase/downloads/ or• IBM JDK http://www.ibm.com/developerworks/java/jdk/ or• Microsoft JDK https://www.microsoft.com/openjdk etc Further, in the case of Android, the JavaCPP Presets also rely on:• Android SDK API 24 or newer http://developer.android.com/sdk/ Manual Installation ------------------- Simply put all the desired JAR files ( , , etc.), in addition to , somewhere in your class path. The JAR files available as pre-built artifacts are meant to be used with JavaCPP. The binaries for Linux are built with Ubuntu, so they should work on most distributions currently in use. Here are some more specific instructions for common cases: NetBeans (Java SE 8 or newer):• In the Projects window, right-click the Libraries node of your project, and select "Add JAR/Folder...".• Locate the JAR files, select them, and click OK. Eclipse (Java SE 8 or newer):• Navigate to Project > Properties > Java Build Path > Libraries and click "Add External JARs...".• Locate the JAR files, select them, and click OK. Visual Studio Code (Java SE 8 or newer):• Navigate to Java Projects > Referenced Libraries, and click .• Locate the JAR files, select them, and click OK. IntelliJ IDEA (Android 7.0 or newer):• Follow the instructions on this page: http://developer.android.com/training/basics/firstapp/• Copy all the JAR files into the subdirectory.• Navigate to File > Project Structure > app > Dependencies, click , and select "2 File dependency".• Select all the JAR files from the subdirectory. After that, we can access almost transparently the corresponding C/C++ APIs through the interface classes found in the packages. Indeed, the translates the code comments from the C/C++ header files into the Java interface files, (almost) ready to be consumed by Javadoc. However, since their translation still leaves to be desired, one may wish to refer to the original documentation pages. For instance, the ones for OpenCV and FFmpeg can be found online at:• OpenCV documentation• FFmpeg documentation Build Instructions ------------------ If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, project files on the Java side were created as Maven modules. By default, the Maven build also installs the native libraries on the native C/C++ side with the scripts, but they can also be installed by other means. Additionally, one can find on the wiki page additional information about the recommended build environments for the major platforms. The Maven modules The JavaCPP Presets depend on Maven, a powerful build system for Java, so before attempting a build, be sure to install and read up on:• Maven 3.x http://maven.apache.org/download.html• JavaCPP 1.5.13 https://github.com/bytedeco/javacpp Each child module in turn relies by default on the included scripts, explained below, to install its…