Skip to main content Skip to complementary content
Close announcements banner

Specifying a Java version to run Jobs or Microservices

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.

Information noteTip: 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. 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:
      1. Browse to the <RemoteEngineInstallationDirectory>/bin/setenv file.
      2. 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:
      1. Browse to the <RemoteEngineInstallationDirectory>/etc/talend-remote-engine-wrapper.conf file.
      2. 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.
  3. Restart the engine.

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 – let us know how we can improve!