Alex
Alex

Reputation: 843

activator or sbt start fails with Play 2.3

I was trying to launch the Play Framework 2.3.4 server on Windows 8 with avtivator start or sbt start, and run into following errors:

The input line is too long.
The syntax of the command is incorrect.

Because of the long CLASSPATH. But event with the newly created app I run into an error:

Bad application path: -Dhttp.port=9000

Upvotes: 1

Views: 1361

Answers (2)

Ubaidah
Ubaidah

Reputation: 897

well, I had the same problem about

Bad application path: -Dhttp.port=9009

So the way I solve it is by editing the Bat file. I manually add all the configuration parameters into the APP_MAIN_CLASS and before the "play.core.server.NettyServer"

something like:

set "APP_MAIN_CLASS= -DapplyEvolutions.default=true -Dhttp.port=9009 play.core.server.NettyServer"

Upvotes: 1

Alex
Alex

Reputation: 843

The first problem can be solved by adding following lines to the build.sbt:

import com.typesafe.sbt.packager.Keys._

scriptClasspath := Seq("*")

The second problem is a currently unresolved bug in sbt-native-packager for Windows. The workaround for me was to use sbt stage and then launch directly the generated bat file at

\target\universal\stage\bin\

Upvotes: 7

Related Questions