Add support for `--add-opens` JVM option
Starting from JDK 9 we may need to add option --add-opens to the application, but if user has JDK 8 installed it won't launch because JDK 8 is not aware of such option.
@asm0dey I would entertain any pull requests on this, although there isn't any support for conditional logic on JVM arguments supplied depending on the JVM that's going to execute at runtime. You can easily supply this as a hard-coded JVM argument, but not conditionally. I think it'd be fairly interesting to support that concept if you were interested in possibly trying to implement it.
Well, if I understand correctly we have a function to get a version of Java. If so — then before building final command we could add one more arg, which will be assigned in the if block
Like
[ parseJavaMajorVersion ${getJavaVersion $java_bin} -ge 9 ] && JAVA_ADD_OPENS=openshere