我在拥有4GB RAM的VM上全新安装了Debian 8。我安装了SonarQube(使用本机包)。当我尝试使用提供的脚本启动时,日志会显示以下内容:
--> Wrapper Started as Daemon
Launching a JVM...
JVM exited while loading the application.
GC Warning: Out of Memory! Returning NIL!
Exception in thread "main" GC Warning: Out of Memory! Returning NIL!
java.lang.OutOfMemoryError
*** Got java.lang.NoClassDefFoundError: gnu.gcj.runtime.NameFinder while trying to print stack trace.
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
我尝试在启动脚本中增加-Xmx和-Xms值无效。
答案 0 :(得分:5)
从您的日志中看来,您使用的是默认的java aka gnu.gcj。
您可以通过编辑wrapper.java.command属性在$ SONAR_HOME / conf / wrapper.conf中选择合适的JVM,即
# To use Java 7
wrapper.java.command=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
# To use Java 8
wrapper.java.command=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java