- OpenJDK (version depends on target OS)
To install OpenJDK:
- Ubuntu systems:
sudo apt-get install -y default-jdk
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
Use import org.intel.openvino.*;
for OpenVINO Java API 2.0 or import org.intel.openvino.compatibility.*;
for deprecated API.
- 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.