Scala: Fixing the pesky java.lang.OutOfMemoryError: PermGen space with SBT


When I started to use SBT, I continuously ran in to the pesky PermGen space error.

[error] java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
[error] Use 'last' for the full log.

To solve the problem, I added the following environment variable to my bash profile:

export SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:PermSize=256M -XX:MaxPermSize=512M"
%d bloggers like this: