According to documentation (https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars002.html https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#tooloptions), Oracle JDK supports environnement variable JAVA_TOOL_OPTIONS to pass JVM options to any JVM which take precedence over other options.
In SonarQube, all JVM options should be specified though dedicated properties in sonar.properties.
Therefor, when starting, SonarQube should:
- display a warning when JAVA_TOOL_OPTIONS is defined, stating that it will be ignored for subprocesses (it's too late for main process)
- pass an empty JAVA_TOOL_OPTIONS environnement variable to sub processes