I am running
sbt compile
for a compiling a program. I am getting the
OutOfMemoryError: Java heap space
Exception. Instead I tried
sbt compile -J-Xms4G -J-Xmx6G
But I don't see any difference in memory usage of the program, like ignoring the command-line options, and I get the same exception (and when crashing it is barely using 0.8GB).