# Configuring Java versions to run Jobs or Microservices

Configure your Talend Remote Engine to execute Jobs or Microservices using the appropriate Java version based on each [artifact](https://help.qlik.com/talend/en-US/talend-glossary/Cloud/artifact) Java compatibility level.

By default, a Talend Remote Engine uses the Java version of its environment to execute Jobs or Microservices. From Talend Remote Engine v2.13 to v2.13.9, Java 17 is mandatory for engine startup. Starting from v2.14.0, Java 21 can also be used for engine startup. Java 21 artifact execution support starts from v2.14.2.

To select Java versions for task execution, choose the guidance based on your Talend Remote Engine version:

* v2.14.2 or later: use [Adaptive mode on: dynamic Java selection (v2.14.2 or later)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/journey-adaptive-mode-on-v2-14-2-and-later "In this mode, Talend Remote Engine automatically selects the appropriate Java instance based on the Java compatibility level of the artifact to be executed (Jobs or Microservices).") or [Adaptive mode off: manual Java version configuration (v2.14.2 or later)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/journey-adaptive-mode-off-manual-v2-14-2-and-later "To run Java 21 artifacts without adaptive mode, ensure Java 21 is explicitly configured and takes priority in your PATH environment variable, and set ms.custom.jre.path for Microservices (Data Services and Routes)."), depending on your runtime setup.
* v2.13.9 to v2.14.1: Java 21 artifact execution is not supported. Use [Adaptive mode dynamic Java selection (v2.13.9 to v2.14.1)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/legacy-journey-adaptive-mode-v2-13-9-to-v2-14-1 "Starting from v2.13.9, Talend Remote Engine supports dynamic JVM selection (adaptive mode). This mode automatically selects the Java version based on artifact requirements.") for Java 17 or earlier artifacts. The adaptive mode is recommended for Java version selection.
* v2.13 to v2.13.8: Java 21 artifact execution is not supported. Use [Manual Java version selection (v2.13 to v2.13.8)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/legacy-journey-manual-java-selection-v2-13-to-v2-13-8 "Use this guidance if your Talend Remote Engine version is v2.13 to v2.13.8 and you cannot upgrade to a later version.") for Java 17 or earlier artifacts.

Troubleshooting: If you have adaptive mode enabled but Java 21 artifacts keep running on Java 17 instead of Java 21 despite your configuration, see [Tasks built with Java 21 run on Java 17 when adaptive mode is enabled on the remote engine](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/java-21-tasks-run-on-java-17-adaptive-mode-re "When a Talend Remote Engine with adaptive mode enabled inherits Java 17 as its startup Java version, such as from installation, upgrade, or you custom configuration, tasks built with Java 21 may be executed on Java 17 instead of Java 21, even though Java 17 may not appear in the adaptive mode configuration.") for resolution steps.

## How adaptive mode works

Adaptive mode dynamically selects the Java runtime for each artifact based on its Java compatibility level. This helps you execute artifacts from different Studio versions without rebuilding.

Information noteTip: The artifact's Java compatibility level is set in Talend Studio.

* For further information about setting this level, see [Setting compiler compliance level](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-12/setting-compiler-compliance-level).
* For information about how the compatible Java versions evolve along with Studio versions, see [Compatible Java environments](https://help.qlik.com/talend/en-US/installation-guide-windows/Cloud/compatible-java-environments).

## Typical use cases for adaptive mode

* Jobs built to run on Java 8:

  These Jobs are compiled with the Java 8 compliance level and do not include --add-opens (the Enable Java 17 compatibility checkbox is not selected). They are generally compatible with Java 11. Setting both Java 8 and 11 or setting Java 11 alone in adaptive mode ensures they run correctly.

  Information noteTip: Java 8 does not support --add-opens.

* Standard (data integration) Jobs built to run on Java 11:

  These Jobs are compiled with the Java 8 compliance level and include --add-opens where needed (the Enable Java 17 compatibility checkbox is selected).

  They are generally compatible with Java 11. Running them on Java 17 is possible but can be error-prone, as --add-opens may lack necessary modules for Java 17 to correctly work.

  Setting Java 11 in adaptive mode allows it to handle these Jobs.

* Jobs built to run on Java 17:

  These Jobs are compiled with the Java 17 compliance level. They run on the Java 17 instance set in adaptive mode or, if unset, on the engine’s default Java instance.

### In this section

* [Adaptive mode on: dynamic Java selection (v2.14.2 or later)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/journey-adaptive-mode-on-v2-14-2-and-later)
* [Adaptive mode off: manual Java version configuration (v2.14.2 or later)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/journey-adaptive-mode-off-manual-v2-14-2-and-later)
* [Adaptive mode dynamic Java selection (v2.13.9 to v2.14.1)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/legacy-journey-adaptive-mode-v2-13-9-to-v2-14-1)
* [Manual Java version selection (v2.13 to v2.13.8)](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/legacy-journey-manual-java-selection-v2-13-to-v2-13-8)
* [Displaying Java versions used by a Talend Remote Engine to run tasks](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/displaying-java-versions-used-by-engine)
* [Tasks built with Java 21 run on Java 17 when adaptive mode is enabled on Talend Remote Engine](https://help.qlik.com/talend/en-US/remote-engine-user-guide-linux/Cloud/java-21-tasks-run-on-java-17-adaptive-mode-re)