mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 22:14:59 +00:00
Today we have JAVA_HOME for the compiler Java home and RUNTIME_JAVA_HOME for the test Java home. However, when we compile BWC nodes and run them, neither of these Java homes might be the version that was suitable for that BWC node (e.g., 5.6 requires JDK 8 to compile and to run). This commit adds support for the environment variables JAVA\d+_HOME and uses the appropriate Java home based on the version of the node being started. We even do this for reindex-from-old which requires JDK 7 for these very old nodes. Note that these environment variables are not required if not running BWC tests, and they are strictly required if running BWC tests.