Skip to main content Skip to complementary content

Setting up Java in Talend Studio

You can configure whether to allow Jobs to access internal Java fields and methods in Talend Studio.

Procedure

  1. Click Project settings on the toolbar of the Talend Studio main window, or click File > Edit Project Properties from the menu bar to open the Project Settings dialog box.
  2. Expand the Build node and click Java Version to open the corresponding view.
    Java Version configuration in the Project Settings dialog box.

    From the JDK Compiler compliance level drop-down list, you can see the JDK compiler compliance level for Talend Studio is 1.8.

    The compiler compliance level corresponds to the Java version used for Job code generation. For more information about the compiler compliance level compatibility, see Compatible Java Environments.

  3. Select the Enable Java 17 compatibility check box.
    The Java 17 compatibility prevents the Java illegal reflective access operation errors and makes sure all Jobs have the Java dependencies necessary to execute them.

    In the Module access settings area, the Java internal modules for Talend components, the Talend Component Kit framework, and the Big Data distribution are configured on the Default tab. You can configure the Java internal modules for your custom components and the global Java internal modules for all Jobs and Routes on the Custom tab.

    The Allow Jobs to access internal Java fields and methods if required option reduces the number of JVM warnings and fatal errors that occur when Jobs are executed with Java 11 or Java 17 respectively.

    Example of error you can get if you do not add this parameter:

    Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private static volatile java.net.Authenticator
                          java.net.Authenticator.theAuthenticator accessible: module java.base does not "opens java.net" to unnamed module @121f97fb

    If enabled, the Jobs built by Talend Studio will have the --add-opens parameters in the job.sh or job.bat script files, such as:

    --add-opens=java.base/java.net=ALL-UNNAMED
    The --add-opens parameter is also added in the Java command for all the tRunJob that is set up as independent. As a result, you must rebuild all your Jobs so that these new parameters will be passed to the JVM. Otherwise these parameters will be missing and the Jobs including the independent subJobs will fail at runtime.

    The Jobs built this way cannot be executed with Java 8.

  4. Click Apply and Close to apply your changes and close the dialog box.

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!