Skip to content

Setup development environment

Install the Java Development Kit

The Deep Java Library (DJL) project requires JDK 8 (or later). We recommend using JDK8, since there are some known issues with JDK 11+.

Verify that Java is available in your $PATH environment variable by using the following commands. If you have multiple versions of Java installed, you can use the $JAVA_HOME environment variable to control which version of Java to use.

For ubuntu:

sudo apt-get install openjdk-8-jdk-headless

For centos

sudo yum install java-1.8.0-openjdk

For Mac:

brew tap homebrew/cask-versions
brew update
brew cask install adoptopenjdk8

You can also download and install Oracle JDK manually if you have trouble with the previous commands.

(Optional) Use IntelliJ

You can use the IDE of your choice. We recommend using IntelliJ.

Import the DJL project into IntelliJ

  1. Open IntelliJ and click Import Project.
  2. Navigate to the DJL project root folder and choose Open.
  3. Choose Import project from existing model and select Gradle.
  4. Select the default configuration and choose OK.

(Optional) Import using Gradle/Maven wrappers

You use Gradle and Maven wrappers to build the project, so you don't need to install Gradle or Maven. However, you should have basic knowledge about the Gradle or Maven build system.