I have a Scala data processing tool which is failing with a java.lang.OutOfMemoryError exception. The tool needs to make a couple passes over a large data file
java.lang.OutOfMemoryError
You can pass options to the JVM via -J. E.g.,
scala -J-Xmx2g ...