Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

Qlik Talend Studio: Job fails with error "Unrecognized option: --add-opens"

100% helpful (2/2)
cancel
Showing results for 
Search instead for 
Did you mean: 
wei_guo
Support
Support

Qlik Talend Studio: Job fails with error "Unrecognized option: --add-opens"

Last Update:

Jul 21, 2024 10:53:07 PM

Updated By:

Xiaodi_Shi

Created date:

May 14, 2024 5:31:12 AM

A Job fails to run on a remote JobServer with the following error message:

Unrecognized option: --add-opens=java.base/java.lang=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Cause

The issue occurs with Talend Remote Engine or Talend JobServer using Java 8, but Talend Studio has JDK 17 enabled. The --add-opens option is only supported in java 11 and above, Java 8 does not support it.

If the 'Enable Java 17 compatibility' option is enabled, the Jobs built by Talend Studio will have the --add-opens parameters in the job.sh or job.bat script files, such as:

 

JAVA_OPTS=-Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -Dconsole.encoding=UTF-8 --add-opens=java.base/java.lang=ALL-UNNAMED

 

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

 

Resolution

Option 1:

  1. Click project_settings.png on the toolbar of 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.
  3. Deactivate the 'Enable Java 17 compatibility' option.
  4. Re-build the Job and re-publish it to Talend Remote Engine or Talend JobServer.

Option 2:

From R2024-05, Java 17 will become the only supported version to start most Talend modules, If you want to keep the "Enable JAVA 17 Compatibility" option enabled, make sure that Talend Remote Engine or Talend JobServer also uses JDK 17 to execute jobs.

For Java Option Command --add-opens, using SPACE or = depends on OS, JDK version or the place where you setup, there are 3 cases:
1. support both SPACE and =
2. support SPACE only
3. support = only
Example:
 --add-opens=java.base/java.net=ALL-UNNAMED
 --add-opens java.base/java.net=ALL-UNNAMED

 

Related Content

Setting-compiler-compliance-level

Java 17 Migration Guide

 

Environment

Labels (2)
Version history
Last update:
‎2024-07-21 10:53 PM
Updated by: