- Click on the toolbar of the Talend Studio main window, or click from the menu bar to open the Project Settings dialog box.
Expand the Build node and click Java
Version to open the corresponding view.
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.
Select the Enable Java 17
compatibility (from R2023-10 onwards) or Allow Jobs
to access internal Java fields and methods if required (from
R2022-12 to R2023-08) check box to enable Java 17 compatibility or to prevent
the Java illegal reflective access operation errors and make 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:
The --add-opens parameter are 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.
- Click Apply and Close to apply your changes and close the dialog box.