Setting system properties with “sbt run”

后端 未结 4 2008
灰色年华
灰色年华 2020-12-29 06:52

I\'m using a pretty recent version of SBT (seems to be hard to figure out what the version is). I want to pass system properties to my application with sbt run

4条回答
  •  遥遥无期
    2020-12-29 07:40

    SBT's runner doesn't normally create new processes, so you also have to tell it to do this if you want to set the arguments that are passed. You can add something like this to your build settings:

    fork := true
    
    javaOptions := Seq("-Dmx=1024M")
    

    There's more detail on forking processes in the SBT documentation.

提交回复
热议问题