LoginSignup
3
3

More than 5 years have passed since last update.

[Playframework]windowsでactivator startがエラーになる

Last updated at Posted at 2016-02-19

windowsでactivator startができない。
環境は下記の通り
windows7 Professional
activator 1.3.7
play 2.3.10
scala 2.10.2
java 1.8.0_45

入力行が長すぎます。コマンドの構文が誤っています。

activator startコマンドを実行すると下記のエラーが発生。


入力行が長すぎます。
コマンドの構文が誤っています。

対処法
クラスパス・環境変数が長すぎるのが原因のようなので、build.sbtに下記を追記した。

import com.typesafe.sbt.packager.Keys.scriptClasspath

scriptClasspath := {
  val originalClasspath = scriptClasspath.value
  val manifest = new java.util.jar.Manifest()
  manifest.getMainAttributes().putValue("Class-Path", originalClasspath.mkString(" "))
  val classpathJar = (target in Universal).value / "lib" / "classpath.jar"
  IO.jar(Seq.empty, classpathJar, manifest)
  Seq(classpathJar.getName)
}
mappings in Universal += (((target in Universal).value / "lib" / "classpath.jar") -> "lib/classpath.jar")

play アプリケーションのクラスパス指定を短くする
結果別のエラー。


Bad application path: -Dhttp.port=9000

Bad application path: -Dhttp.port=9000

activator start errror - Bad application path: -Dhttp.port=9000
activatorのバグ?
playの設定を変える形での対処法は今のところ無さそう。

とりあえず動かす

Assets.versionedの動作を確認したかったのでプロダクションモードでどうにか起動してみる。

activator stage実行後、
target\universal\stage\bin以下にあるプロジェクト名.batを実行するとplayが起動した。
Why does “activator start” fail with “Bad application path”?

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3