# Use the following property to customize JVM options. Enabling the HotSpot Server VM
# mode (-server) is recommended.
# Note that the option -Dfile.encoding=UTF-8 is mandatory.
-#sonar.web.javaOpts=-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError \
-# -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false
+#sonar.web.javaOpts=-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError
-# Same as previous property, but allows to not repeat all settings like -Djava.awt.headless=true
+# Same as previous property, but allows to not repeat all other settings
+# like -Djava.awt.headless=true
#sonar.web.javaAdditionalOpts=
# Binding IP address. For servers with more than one IP address, this property specifies which
# JVM options. Note that enabling the HotSpot Server VM mode (-server) is recommended.
#sonar.search.javaOpts=-Xmx256m -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true \
# -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 \
-# -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError \
-# -Djava.awt.headless=true
+# -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError
-# Same as previous property, but allows to not repeat all settings like -Djava.awt.headless=true
+# Same as previous property, but allows to not repeat all other settings
+# like -Djava.awt.headless=true
#sonar.search.javaAdditionalOpts=
# Elasticsearch port. Default is 9001. Use 0 to get a free port.
JavaCommand elasticsearch = new JavaCommand("search");
elasticsearch
.setWorkDir(homeDir)
+ .addJavaOptions("-Djava.awt.headless=true")
.addJavaOptions(props.nonNullValue(DefaultSettings.SEARCH_JAVA_OPTS))
.addJavaOptions(props.nonNullValue(DefaultSettings.SEARCH_JAVA_ADDITIONAL_OPTS))
.setTempDir(tempDir.getAbsoluteFile())
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(props.nonNullValue(DefaultSettings.WEB_JAVA_OPTS))
.addJavaOptions(props.nonNullValue(DefaultSettings.WEB_JAVA_ADDITIONAL_OPTS))
.setTempDir(tempDir.getAbsoluteFile())