Specifying a Java version to run Jobs or Microservices - Cloud

Talend Remote Engine User Guide for Windows

Version
Cloud
Language
English
Operating system
Windows
Product
Talend Cloud
Module
Talend Remote Engine
Content
Design and Development
Installation and Upgrade
Last publication date
2024-02-23

Enable your Remote Engine to run Jobs or Microservices using a specific Java version.

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. However, when it comes to running Jobs or Microservices, you can specify a different Java version. This feature allows you to use a newer engine version to run the artifacts designed with older Java versions, without the need to rebuild these artifacts, such as the Big Data Jobs, which reply on Java 8 only.

When developing new Jobs or Microservices that do not exclusively rely on Java 8, that is to say, they are not Big Data Jobs, 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.

Tip: Specifying a Java version during installation using the installer is an alternative to this section, but the version defined here takes precedence for Job and Microservice executions.

Procedure

  1. Stop the engine.
  2. Browse to the <RemoteEngineInstallationDirectory>/etc directory.
  3. Depending on the type of the artifacts you need to run with a specific Java version, do the following:
    • For Jobs, in the <RemoteEngineInstallationDirectory>/etc/org.talend.remote.jobserver.server.cfg file, add the path to the Java executable file. For example,
      org.talend.remote.jobserver.commons.config.JobServerConfiguration.JOB_LAUNCHER_PATH=c:\\jdks\\jdk11.0.18_10\\bin\\java.exe
    • For Microservices, in the <RemoteEngineInstallationDirectory>/etc/org.talend.ipaas.rt.dsrunner.cfg, add the path to the Java executable file. For example,
      ms.custom.jre.path=C\:/Java/jdk/bin

      Make this modification before deploying your Microservices to ensure that these changes are correctly taken into account.

    For both artifact types, use backslashes to escape characters specific to a Windows path, such as colons, whitespace, and directory separators, while keeping in mind that directory separators are also backslashes on Windows. For example:
    c:\\Program\ Files\\Java\\jdk11.0.18_10\\bin\\java.exe
  4. Restart the engine.