Support for JDK-17 upgrade #850
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.
Description
As part of the migration from JDK 8 to JDK 17, the environment variables have been updated to ensure the application runs using Java 17. This change is required because the latest jars are compiled with JDK 17 and will not be compatible with JDK 8. The update sets JAVA_HOME, adjusts the PATH, and defines JAVA_BIN accordingly.
Changes
Updated JAVA_HOME to point to JDK 17 (/usr/lib/jvm/java-17-openjdk-amd64).
Updated PATH to ensure Java 17 executables are used by default.
Defined JAVA_BIN explicitly as $JAVA_HOME/bin/java.
Ensures compatibility with jars compiled using JDK 17.
While upgrading from JDK 8 to JDK 17, reflective access to certain internal Java APIs (like java.lang and java.lang.reflect) is restricted due to JDK 9+ module system changes. To maintain backward compatibility with existing code and dependencies that rely on reflection, the following JVM parameters have been added:
Testing Done
Created an engine with these changes.
Verified that the latest version is successfully verified and upgraded after applying the changes.