Setting up compatible Java versions to run Jobs or Microservices
Configure your Remote Engine to execute Jobs or Microservices using the appropriate Java version based on those artifacts' Java compatibility levels.
By default, a Remote Engine uses the Java version of its environment to execute Jobs or Microservices. With Remote Engine v2.13 and onwards, Java 17 is mandatory for engine startup.
- Recommended for engines starting from v2.13.9 (released in R2025-01): from that release, Remote Engine adopts a dynamic JVM selection mode. This mode automatically adapts the engine to the correct Java version to run Jobs or Microservices. See Adaptive mode: Configuring Remote Engine to dynamically select Java version.
- If your engine is v2.13 or later but still older than v2.13.9 and you cannot upgrade it to the latest version, following this procedure to specify the Java version to be used for executions. This approach is not dynamic and only one version can be specified. See Specifying a Java version to run Jobs or Microservices.
Adaptive mode: Configuring Remote Engine to dynamically select Java version
In this mode, Remote Engine automatically selects the appropriate Java instance based on the Java compatibility level of artifact to be executed (Jobs or Microservices).
This dynamic Java version (adaptive) mode helps you execute artifacts from different Studio versions without rebuilding.
- For further information about setting this level, see Setting compiler compliance level.
- For information about how the compatible Java versions evolve along with Studio versions, see Compatible Java environments.
Procedure
Specifying a Java version to run Jobs or Microservices
Configure your Remote Engine to run Jobs or Microservices using a specific Java version. If you have activated the adaptive mode explained above, ignore this section.
This section provides an alternative to the adaptive mode if the latter is not available to your engine version. It allows you to run the artifacts designed with Java versions older than Java 17.
When developing new Jobs or Microservices, consider building them with the add-opens option to ensure compatibility with Java 17. This option opens the necessary packages for Java 17 compatibility, making your Jobs or Microservices directly runnable on the newer Remote Engine version, without having to go through the procedure explained in this section for defining a specific Java version. For further information about how to use this add-opens option and its limitation, see Setting up Java in Talend Studio.
Procedure
- Stop the engine.
-
Depending on whether the engine has been installed as a Linux system service, do
the following:
- If the engine was not installed as a Linux system service:
- Browse to the <RemoteEngineInstallationDirectory>/bin/setenv file.
- Add the following line: export
PATH="<path-to-jvm-bin-directory>:${PATH}"
This path-to-jvm-bin-directory is the path to the bin folder of the JVM instance you need to use to run Jobs or Microservices. This line adds this path to the PATH environment variable.
- If the engine was installed as a Linux system service:
- Browse to the <RemoteEngineInstallationDirectory>/etc/talend-remote-engine-wrapper.conf file.
- Add the following line to the Wrapper Properties
section or change the path if this line exists already:
set.PATH=<desired-java-home-path>:%PATH_WITH_JAVA%
This desired-java-home-path is the path to the bin folder of the Java instance to be used. This path must be added right after set.PATH=. Keep %PATH_WITH_JAVA% as is.
- If the engine was not installed as a Linux system service:
- Restart the engine.