Description
On JDK 17, the Gfsh "wrapper" scripts (geode-assembly/src/main/dist/bin/gfsh and geode-assembly/src/main/dist/bin/gfsh.bat) must open/export all required packages when they run the Geode CLI launcher (org.apache.geode.management.internal.cli.Launcher) via Java.
Also, Gfsh must open and export all required packages whenever it starts Java process that will execute Geode code.
Here is a possible approach: * Create argument files for each set of opens/exports that are selected together. Each argument file will define the -add-opens and -add-exports commands for the relevant packages.
- Change the Gfsh executables (geode-assembly/src/main/dist/bin/gfsh and geode-assembly/src/main/dist/bin/gfsh) to:
- Inspect the requested JDK to learn the version and OS it reports.
- Select the argument files for the JDK based on its version and OS
- Add the argument files to the java command line when starting the CLI launcher.
- Change Gfsh Java classes to forward the opens/exports when launching java subprocesses (e.g. when starting a locator or server).