Auto detect Java major version

The commit adds the ability to turn on Java version detection. This
will scan the application to detect the major version of Java that
should be used for the application and then refer to the config file
for the exact version to use.

[#71382852]