Skip to main content Skip to complementary content

Upgrading Java for all Talend services

You can upgrade Java to avoid security issues. This procedure will go through the different steps required for minor or major updates of Java on Talend services. It can also be followed for minor downgrades.

Before you begin

  • Download and extract the update_java.zip file. Use the .bat file or the .sh file depending on your operating system.
  • On Windows, download the sed.zip archive only if there is no such file in the utils folder in the Talend home folder.

About this task

The procedures to update all Talend services exclude Talend Remote Engine, because this service requires different steps. For more information, see Upgrading Java for Talend Remote Engine.
Information noteRestriction: Talend LogServer (deprecated), Talend MDM, and Nexus do not support Java 17. Nexus does not support Java 11.

Upgrading Java for all Talend services on Linux

Procedure

  1. Install the new Java version according to the Compatible Java environments page.
  2. Find all the running Talend services with the command systemctl | grep talend.
  3. Stop all Talend services with the command systemctl stop <service name>.
  4. Open update_java.sh with a text editor.
  5. Locate the variables in the script and set them as follows:

    TALEND_HOME=<Talend_home_folder> (for example: TALEND_HOME=/opt/Talend-8.0.1)

    PROD_VER=<Talend_version> (for example: PROD_VER=8.0.1)

    JAVA_HOME=<Java_home_folder> (for example: JAVA_HOME=/usr/lib/jvm/jre1.8.0_221)
  6. As a superuser, run update_java.sh. This script will replace the hard-coded path to Java with the new values in your installation.
  7. Restart your computer or start all Talend services manually with the command systemctl start <service name>.

Results

All Talend services, except Talend Remote Engine, are now using the new Java version.

Upgrading Java for all Talend services on Windows

Procedure

  1. Place the update_java.bat file in the utils folder in the Talend home folder.
  2. If you downloaded the sed.zip, place it in the utils folder.
  3. Install the new Java version according to the Compatible Java environments page.
  4. In Windows search tab, type in services.msc and open the Microsoft Management Console application.
  5. Look for the list of Talend services, right-click each of them and select Stop.
    The last services to be stopped should be Talend Administration Center, Talend Identity and Access Management, then Kafka, ZooKeeper, and MongoDB.
  6. Go to System Properties > Advanced > Environments Variables.
  7. Update the JAVA_HOME environment variable and the PATH variable:
    1. Under System Variables, click New... to create a variable. Name the variable JAVA_HOME, enter the path to your Java environment, and click OK.
    1. Under System Variables, select the Path variable, click Edit... and add the following variable at the end of the Path variable value: ;%JAVA_HOME%\bin
  8. Open the command prompt application.
  9. Type in echo %JAVA_HOME% and press Enter. The value displayed is the new value set.
  10. Open update_java.bat with a text editor.
  11. Locate the variables in the script and set them as follows:

    "TALEND_HOME=C:\<Talend_home_folder>" (for example: set "TALEND_HOME=C:\Talend\8.0.1")

    "PROD_VER=<Talend_version>" (for example: set "PROD_VER=8.0.1")

  12. Add --add-opens=java.base/java.lang=ALL-UNNAMED in the setenv.bat file, if you have not yet this configuration.
    Then run the following command as administrator to start Talend Administration Center service:
    cd C:\Talend\8.0.1\tac\apache-tomcat\bin
    tomcat9.exe //US//talend-tac-8.0.1 ++JvmOptions="--add-opens=java.base/java.lang=ALL-UNNAMED
  13. As a superuser, run update_java.bat. This script will replace the hard-coded path to Java with the new values in your installation.
  14. Restart your computer or start all Talend services manually from the service.msc application.

Results

All Talend services, except Talend Remote Engine, are now using the new Java version.

Upgrading Java for Talend Remote Engine

This section describes the upgrade of Java version from 8 to 11, when a Remote Engine is already installed.

Procedure

  1. Having the Talend Remote Engine running on Java 8, copy/paste the following files into <RE>/deploy directory:
    • <RE>/system/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxws-api-2.3/2.3_2/org.apache.servicemix.specs.jaxws-api-2.3-2.3_2.jar.
    • <RE>/system/org/apache/servicemix/specs/org.apache.servicemix.specs.saaj-api-1.4/1.4_1/org.apache.servicemix.specs.saaj-api-1.4-1.4_1.jar (only in case the observability feature is not enabled).
    Wait for a minute until the installation is complete.
  2. Stop your Talend Remote Engine and its service if they are running (see Managing the Remote Engine Service).
  3. Install the Java 11 version.
  4. Update the system service file (/opt/Talend Remote Engine/etc/talend-remote-engine-wrapper.conf):
    1. Edit the file and look for the following line: set.default.JAVA_HOME=/usr/lib/jvm/jre1.8.0_221.
      Update it with the new JAVA_HOME path. For example: set.default.JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64".
    2. Add a new variable to describe the Talend Remote Engine Karaf container version. The value should be 4.2.12 for RE versions 2.11.2 to 2.11.11, and 4.2.15 for RE versions starting from 2.12.0.
      For example: set.default.KARAF_VERSION=4.2.15.
    3. Add extra Java options configuration after "set.JAVA_TOOL_OPTIONS=-Dlog4j2.formatMsgNoLookups=true":
      set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-
      
      module java.base=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.locator-%KARAF_VERSION%.jar --patch-module 
      java.xml=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.java.xml-%KARAF_VERSION%.jar --add-
      opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens 
      java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED --add-
      
      exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
    4. Update Karaf Java classpath by replacing
      wrapper.java.classpath.1=%KARAF_BASE%/lib/boot/*.jar
      wrapper.java.classpath.2=%KARAF_BASE%/lib/wrapper/*.jar
      by:
      wrapper.java.classpath.1=%KARAF_BASE%/lib/boot/*.jar
      wrapper.java.classpath.2=%KARAF_BASE%/lib/jdk9plus/*.jar
      wrapper.java.classpath.3=%KARAF_BASE%/lib/wrapper/*.ja
    5. Update JVM parameters by replacing
      wrapper.java.additional.1=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
      wrapper.java.additional.2=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
      wrapper.java.additional.3=-Dkaraf.instances=%KARAF_HOME%/instances
      wrapper.java.additional.4=-Dkaraf.home=%KARAF_HOME%
      wrapper.java.additional.5=-Dkaraf.base=%KARAF_BASE%
      wrapper.java.additional.6=-Dkaraf.data=%KARAF_DATA%
      wrapper.java.additional.7=-Dkaraf.etc=%KARAF_ETC%
      wrapper.java.additional.8=-Dkaraf.log=%KARAF_LOG%
      wrapper.java.additional.9=-Dkaraf.restart.jvm.supported=true
      wrapper.java.additional.10=-Djava.io.tmpdir=%KARAF_DATA%/tmp
      wrapper.java.additional.11=-Djava.util.logging.config.file=%KARAF_ETC%/java.util.logging.properties
      wrapper.java.additional.12=-Dkaraf.startLocalConsole=false
      wrapper.java.additional.13=-Dkaraf.startRemoteShell=true
      by:
      wrapper.java.additional.1=-Dkaraf.instances=%KARAF_HOME%/instances
      wrapper.java.additional.2=-Dkaraf.home=%KARAF_HOME%
      wrapper.java.additional.3=-Dkaraf.base=%KARAF_BASE%
      wrapper.java.additional.4=-Dkaraf.data=%KARAF_DATA%
      wrapper.java.additional.5=-Dkaraf.etc=%KARAF_ETC%
      wrapper.java.additional.6=-Dkaraf.log=%KARAF_LOG%
      wrapper.java.additional.7=-Dkaraf.restart.jvm.supported=true
      wrapper.java.additional.8=-Djava.io.tmpdir=%KARAF_DATA%/tmp
      wrapper.java.additional.9=-Djava.util.logging.config.file=%KARAF_ETC%/java.util.logging.properties
      wrapper.java.additional.10=-Dkaraf.startLocalConsole=false
      wrapper.java.additional.11=-Dkaraf.startRemoteShell=true
      Information noteNote: Lines to be replaced are original ones created after the Talend Remote Engine installation. In case you added extra JVM parameters, they should be placed after this above list, with a numbering starting from 12, and without leaving gaps.
  5. Edit file /opt/Talend Remote Engine/bin/talend-remote-engine-service and look for the following line: JAVA_HOME="/usr/lib/jvm/jre1.8.0_221":
    Update it with the new JAVA_HOME path. For example: JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64".
  6. Start the Remote Engine service (see Managing the Remote Engine Service).
  7. Open Talend Management Console and check your Talend Remote Engine availability and status in logs.
  8. Start your Talend Remote 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 – please let us know!