Add java level check server script for java 24 #33652
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes ##32996
We include the --add-exports java.base/sun.security.action=ALL-UNNAMED JVM parameter in the java9.options file that is needed for the com.ibm.crypto.ibmkeycert.jar file.
Starting in Java 24, the sun.security.action.* classes were removed, so if the JVM parameter --add-exports java.base/sun.security.action=ALL-UNNAMED is passed in, the JVM gives an informational warning:
WARNING: package sun.security.action not in java.base
in the console.log file.
To fix this problem, the --add-exports java.base/sun.security.action=ALL-UNNAMED parameter should be excluded whenever running on Java 24+.
This update checks for the Java level in the release file (if it exists) in the JAVA_HOME directory. From this, if we are able to determine the Java level being used is Java 24+, then we exclude the JVM parameter --add-exports java.base/sun.security.action=ALL-UNNAMED. This update will also allow future JVM parameters from the java9.options file to be excluded if necessary.
This PR also grants explicit JNI permission when starting the JVM on z/OS when running on Java 24+. JNI is required on the z/OS platform and in Java 24+, explicit permission when starting the JVM is required to use JNI.