Set java options for running playframework project in sbt

I can run with overriden java options my playframework application using: run -Dprop1=val1 -Dprop2=val2 . It works perfectly. But when I'm trying to do it via sbt build - props are not available.

So, I have scala file where my propject defined:

object PrjBuild extends Build  {
 val runSettings = Seq(
    fork in run := true,
    (javaOptions in run) ++= Seq(

   lazy val root = Project(id = "my-play-project",
    base = file("."),
    settings = Seq(
      // some options here ...
      routesGenerator := InjectedRoutesGenerator
    ) ++ runSettings

Please advice what am I doing wrong. I was relying on sbt fork documentation:

But actually I would prefer to work without forking as run -Dp1=v1 does not use forking. I want to perform same props setup but programmatically.


When you use run without forking, you are using the same JVM as SBT. If you want some props to be available in this JVM, you need to start SBT with them:

sbt -Dprop1=val1 -Dprop2=val2

Need Your Help

`data.table` error: "reorder received irregular lengthed list" in setkey

r data.table

I have a fairly basic data.table in R, with 250k rows and 90 columns. I am trying to key the data.table on one of the columns which is of class character. When I call:

PHP + MySQL + Ajax Search or Data Framework

php mysql ajax

i tried several ajax/js "frameworks" and "data grids" to show some mysql data, but the problem is that i have to many columns (like 50) and some of then need to be links, images and also get the ID...