title: How to have a Scala standalone application that uses the playframework libraries
body: <p>I have this simple test Scala application, which a blocking http request:</p>
  
  <p><strong>build.sbt</strong></p>
  
  <pre><code>name := "hello"
  
  version := "1.0"
  
  scalaVersion := "2.11.2"
  
  libraryDependencies += "com.typesafe.play" %% "play-ws" % "2.4.0-M1"
  </code></pre>
  
  <p><strong>Test.scala</strong></p>
  
  <pre><code>import play.api.libs.json._
  import play.api.libs.ws._
  import scala.concurrent.duration.Duration
  import scala.concurrent.{Await, Future}
  
  object Test {
    def main(args: Array[String]) = {
      val wsClient = WS.client
      val body = getBody(wsClient.url("http://example.com/").get())
      println(s"body: $body")
    }
  
    def getBody(future: Future[WSResponse]) = {
      val response = Await.result(future, Duration.Inf);
      if (response.status != 200)
        throw new Exception(response.statusText);
      response.body
    }
  }
  </code></pre>
  
  <p>This application fails with:</p>
  
  <pre><code>Exception in thread "main" java.lang.RuntimeException: There is no started application
  </code></pre>
  
  <p>How to solve this issue?</p>