Skip to main content Skip to complementary content

Tasks built with Java 21 run on Java 17 when adaptive mode is enabled on Talend Remote Engine

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.

This is an edge case that occurs under specific installation, upgrade, or custom configuration scenarios. This topic explains the symptom, cause, and resolution steps.

Symptom

Your Talend Remote Engine is configured with adaptive mode enabled to dynamically select Java versions for task execution. However, when you deploy and run a task built with Java 21 compliance level, the task executes on Java 17 instead of Java 21. This occurs even though:

  • Java 21 is configured and available in the adaptive mode configuration file (<RE_installation>/etc/system.properties).
  • Java 17 does not appear in the adaptive mode configuration, or appears with a comment marker.

This behavior affects:

  • Data Integration Jobs built with Java 21 compliance level
  • Microservices (Data Services and Routes) built with Java 21 compliance level

Cause

When adaptive mode is enabled, the engine uses the startup Java version (Java 17 in this case) as a fallback for any configured Java version that is not explicitly defined in the system.properties file.

However, when the default startup Java version has been set to Java 17, this fallback behavior may inadvertently keep taking precedence over Java 21, causing Java 21 artifacts to run on Java 17.

Resoluion:

Procedure

  1. Stop the remote engine.
  2. Open the <RE_installation>/etc/system.properties file in a text editor.
  3. In the adaptive mode Java path configuration section, verify that org.talend.execution.JAVA_21_PATH is explicitly configured and points to a valid Java 21 installation. For example:

    Example

    org.talend.execution.JAVA_21_PATH=/usr/lib/jvm/java-21-openjdk-amd64/bin
    # or on Windows:
    # org.talend.execution.JAVA_21_PATH=C:\\Program Files\\Java\\jdk-21\\bin
  4. Disable the Java 17 fallback by adding the following line at the end of the system.properties file:
    reuse.self.jvm.version=false

    This line prevents the engine startup Java version from being used as a fallback for Java versions not explicitly configured in adaptive mode. With this setting, if a Java 21 artifact is deployed and Java 21 is configured, it will be selected.

  5. Save the file.
  6. Restart the remote engine.
  7. Re-deploy your Java 21 tasks. They should now execute on Java 21.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!