Unrecognized option: --add-opens=java.base/java.lang=ALL-UNNAMED
search cancel

Unrecognized option: --add-opens=java.base/java.lang=ALL-UNNAMED

book

Article ID: 276622

calendar_today

Updated On: 04-22-2025

Products

CA API Gateway

Issue/Introduction

On API Gateway 11.0 GA Software-Form-Factor (SFF) installation, setup.sh was run with a '-jdk' option.

Choosing "2) Configure the Layer7 API Gateway" resulted in an error below.

 

Command:

# /opt/SecureSpan/Gateway/runtime/bin/setup.sh -jdk /opt/jdk-11.0.15+10

Gateway Main Menu (Software):

Layer7 API Gateway Software configuration menu.

What would you like to do?

 1) Upgrade the Layer7 API Gateway database
 2) Configure the Layer7 API Gateway
 3) Display the current Layer7 API Gateway configuration
 4) Change the Layer7 API Gateway Cluster Passphrase
 5) Change the Master Passphrase
 6) Reset Admin password
 X) Exit

Please make a selection: 2

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.

Press [Enter] to continue

 

Environment

API Gateway: version 11.0 GA (Software-Form-Factor)

OS: CentOS 7.9

JDK: Eclipse Temurin Version 11.0.15+10

MySQL: Ver 8.0.35 for Linux on x86_64 (MySQL Community Server - GPL)

Cause

The command option '-jdk' seems to not work properly in this case.

Resolution

Set JAVA_HOME explicitly, and run setup.sh with no option.

 

Example for bash:

# export JAVA_HOME=/opt/jdk-11.0.15+10

# /opt/SecureSpan/Gateway/runtime/bin/setup.sh