Practical overview
When it fits
Use Djl when deep-learning tasks need to be developed as part of a Java project and an engine-agnostic framework is useful.
Who it is for
- Java developers adding deep-learning inference to an application.
- Teams building or training neural-network models using Java.
- Developers creating Java tools around a framework with an engine-agnostic interface.
Documented uses
- Load a pretrained model and run inference, such as image classification.
- Construct and train a neural network using datasets and training configuration.
- Save a trained model and integrate model work into a Java application.
Requirements & limits
The project is open source under the Apache-2.0 license.
- Djl is a Java framework, not a hosted model service.
- The README describes both pretrained-model inference and model training, so the framework can support different stages of model work.
- The project describes automatic CPU/GPU selection based on hardware configuration.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Build DJL from source with Gradle
Build a checked-out DJL repository using its Gradle wrapper.
Before you start
- DJL source code checked out locally.
- A Linux/macOS or Windows environment, as the instructions provide wrapper commands for these platforms.
Steps
Open a terminal in the checked-out DJL repository.
On Linux or macOS, run
./gradlew build; on Windows, rungradlew build.Alternatively, to skip unit tests, run
./gradlew build -x teston Linux or macOS, orgradlew build -x teston Windows.
Expected outcome
The Gradle wrapper is invoked to build DJL; the test-skipping variant excludes unit tests.
Guide limitations
- The README does not specify additional software prerequisites or describe the build artifacts.
- Skipping tests means unit tests are not run.
Import DJL source into Eclipse
Generate Eclipse project files and import the existing Gradle project.
Before you start
- DJL source code checked out locally.
- Eclipse and Gradle support in Eclipse.
- Set the Eclipse workspace text encoding to UTF-8.
Steps
In the repository, run
./gradlew eclipseon Linux or macOS, orgradlew eclipseon Windows.In Eclipse, choose File → Import → Gradle → Existing Gradle Project.
Set the workspace text encoding to UTF-8.
Expected outcome
The DJL source project is imported into Eclipse as an existing Gradle project.
Guide limitations
- The instructions do not describe Eclipse version requirements or troubleshooting.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Djl | Load a pretrained model and run inference, such as image classification. | Desktop, Server | The project is open source under the Apache-2.0 license. |
| Hyperpose | Customize pose-estimation architectures and datasets. | Docker, Linux, macOS, Windows | |
| Multi Task Nlp | Define multiple tasks and their data and model settings in a YAML file. | Linux, macOS, Windows | The project is an open-source library under the Apache-2.0 license, distributed through its public GitHub repository. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- deepjavalibrary/djl · Official homepage title · retained in its source language

