LoginSignup
5
6

More than 5 years have passed since last update.

Play Framework プロジェクト作成 めも

Last updated at Posted at 2014-08-09

Play Framework プロジェクト作成 めも

PlayFrameworkをインストールしていることが前提です。
(※Windowsでもコマンドプロンプトで多分実行できるはず・・・)

プロジェクトの作成

ターミナルから下記のコマンドを実行する。

$ activator new プロジェクト名

下記のように聞かれるため、作成したいテンプレートを指定。

Browse the list of templates: http://typesafe.com/activator/templates
Choose from these featured templates or enter a template name:
  1) minimal-java
  2) minimal-scala
  3) play-java
  4) play-scala
(hit tab to see a list of all templates)

プロジェクトをビルトインサーバで起動

ターミナルから下記のコマンドを実行する。

$ cd プロジェクトフォルダ
$ activator run

http://localhost:9000 で起動できる。

Eclipseプロジェクトとして登録するには

ターミナルから下記のコマンドを実行する。

$ cd プロジェクトフォルダ
$ activator eclipse

EclipseでJavaプロジェクトを作成し、作成したPlayのプロジェクトを読み込ませる。

(以下、".gitignore"に記載されていない場合)
GitでEclipseの設定ファイルをコミットしないように".gitignore"に下記を追記する。

  • /.classpath
  • /.project
  • /.settings

JavaのバージョンとかOSによっては必要っぽいの

set _JAVA_OPTIONS="-Dfile.encoding=SJIS"
export _JAVA_OPTIONS="-XX:-UseSplitVerifier"
5
6
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
5
6