Fixing “Invalid maximum heap size: …”

This happens when you don’t follow the format for Java memory size.

It should look like one of these values:

set SBT_OPTS="-Xmx4G"
set SBT_OPTS="-Xmx4000M"

If you use “GB” or put a space in (“-Xmx 4G”) you will get this error.

Interested in Scala? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *