Skip to content

Files

Latest commit

a508f97 · Jun 13, 2024

History

History
This branch is 14 commits behind openvinotoolkit/openvino_contrib:master.

java_api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Feb 22, 2022
Jun 29, 2023
Jan 16, 2024
Jun 13, 2024
Jun 29, 2023
Nov 9, 2023
Jan 16, 2024
May 22, 2024
Dec 12, 2023
Dec 12, 2023

Java bindings for OpenVINO

Documentation Status

Software Requirements

  • OpenJDK (version depends on target OS)

Linux

To install OpenJDK:

  • Ubuntu systems:
    sudo apt-get install -y default-jdk

Build

To build OpenVINO so that it includes this module, use the following CMake command:

cd <openvino_build>
cmake -DBUILD_java_api=ON -DOPENVINO_EXTRA_MODULES=<openvino_contrib>/modules <openvino_source_directory>
cmake --build . -j8

Set OpenVINO environment variables:

source <openvino_install>/setupvars.sh

Use Gradle to build openvino-x-x-x.jar file with OpenVINO Java bindings:

cd openvino_contrib/modules/java_api
gradle build

Import

Use import org.intel.openvino.*; for OpenVINO Java API.

Set up the development environment

Import to IntelliJ IDEA

  • Install and enable the Gradle IntelliJ Plugin by navigating to Settings > Plugins. Search for the Gradle plugin and install it, if not already installed.
  • Clone the repository
    git clone https://github.com/openvinotoolkit/openvino_contrib.git
  • To import the project into IntelliJ IDEA, select File > Open and locate the java api module in <openvino_contrib>/modules/java_api.

See here for instructions on running tests.