The following environment variable settings have proven valuable.
Implement these as appropriate for your platform. What is shown here is Linux Bash syntax. MS-Windows users will use the environment variables setting dialog available in the control panel.
The -Xms2m increases the stack size - the scala compiler is highly recursive and uses deeper stacks than conventional Java programs generally use.
The -Xmx5G allows the JVM to use as much as 10 Gig of RAM - adjust this depending on your RAM size. 5Gig is probably minimum (as of release 2.0.0 of Daffodil)
The JAVA_OPTS, SBT_OPTS, and DAFFODIL_JAVA_OPTS respectively set these flags for the java command, the sbt command, and the daffodil command (aka daffodil CLI).
For LANG, adjust the en_US part to your locale, the important part is the ".UTF8". (TBD: This env-var may not be needed at all)
The file.encoding definition is needed on MS Windows. Not required on Linux.
On MS-Windows it may be necessary to add the java JDK "bin" directory to the PATH. Find where the Java JDK is installed (usually under C:\Program Files\Java\jdk...\bin), and put the bin directory on PATH.
On MS-Windows TMP is generally defined automatically. It is only on some linux systems that there may be no default definition for TMP or TEMP_DIR.