if (StringUtils.isEmpty(props.value(DefaultSettings.CLUSTER_MASTER))) {
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(DefaultSettings.WEB_JAVA_OPTS))
.addJavaOptions(props.nonNullValue(DefaultSettings.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
}