Frage

I'm getting the following trying to run Cobertura as part of my Gradle build.

:cobertura
Instrumenting classes for Cobertura
Exception in thread "Test worker" java.lang.OutOfMemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space

I've tried bumping up DEFAULT_JVM_OPTS/-XX:MaxPermSize in my gradle wrapper script, to no effect. Is there a more direct (and effective) way to do this?

War es hilfreich?

Lösung

The only thing that worked for me was changing the .bashrc on my Linux box to have export _JAVA_OPTIONS='-XX:MaxPermSize=512m' Proof that this got detected by gradle when I built was shown with this message: Picked up _JAVA_OPTIONS: -XX:MaxPermSize=512m

Andere Tipps

Try to set a GRADLE_OPTS environment variable, or a org.gradle.jvmargs property in gradle.properties.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top