if (StringUtils.isBlank(props.value(ProcessConstants.CLUSTER_MASTER_HOST))) {
JavaCommand webServer = new JavaCommand("web")
.setWorkDir(homeDir)
- .addJavaOptions("-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false")
+ .addJavaOptions(DefaultSettings.WEB_SERVER_FORCED_JVM_ARGS)
.addJavaOptions(props.nonNullValue(ProcessConstants.WEB_JAVA_OPTS))
.addJavaOptions(props.nonNullValue(ProcessConstants.WEB_JAVA_ADDITIONAL_OPTS))
.setTempDir(tempDir.getAbsoluteFile())
class DefaultSettings {
+ public static final String WEB_SERVER_FORCED_JVM_ARGS = "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false " +
+ // jruby is slow with java 8: https://jira.codehaus.org/browse/SONAR-6115
+ "-Djruby.compile.invokedynamic=false";
+
private DefaultSettings() {
// only static stuff
}