How to set heap size for sbt?

前端 未结 10 1170
日久生厌
日久生厌 2020-11-29 17:38

I am using SBT 0.12.0. I have read other answers on stack overflow and followed them, however none of them helps, for example:

  • create ForkRun clas
10条回答
  •  青春惊慌失措
    2020-11-29 17:52

    I was looking to solve a problem like this on Mac OS X with a homebrew install of SBT. If you installed SBT via homebrew, you're in the clear since the /usr/local/bin/sbt file looks like

    #!/bin/sh
    test -f ~/.sbtconfig && . ~/.sbtconfig
    exec java -Xmx512M ${SBT_OPTS} -jar /usr/local/Cellar/sbt/0.12.3/libexec/sbt-launch.jar "$@"
    

    This means that any settings you put in SBT_OPTS will stick (your -Xmx will take precedence). Furthermore, the first line of the script will execute any commands in ~/.sbtconfig if it exists so it may be a better place to put your SBT options if you are playing with them quite a bit. You won't have to source ~/.bash_profile every time you make a change to SBT_OPTS

提交回复
热议问题