6 February 2013

How to set path for Play framework in Windows

Solution works for Windows XP,7, etc. and Play framework 1.2.x
(I didn't tested,but i think it works in all Windows XP and above (include 8,servers and etc. and it works in all version of Play Framework ,including 2.x )

You need install play by unzip play zip file somewhere.
I suggest using path with spaces (for example installing to folder: 'Programs Files(x86)' will cause pain in the ass in bizzare cases,so create folder 'Programs' instead (good tip for all java app).
I used C:\Programs\play-1.2.5\

  1. Open cmd (command line) You can do it in few ways for example: a( Press Win+R and type cmd and press enter. b) go to start menu  and press run and type cmd.
  2. type:  setx path "%PATH%;C:\programs\play-1.2.5";
  3. Close Command line window and ... Open command line again and type play

if you see output
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~ play! 1.2.5, http://www.playframework.org
~ Usage: play cmd [app_path] [--options]
~ with, new Create a new application
~ run Run the application in the current shell
~ help Show play help

Btw. it will not work if you don't have admin previllage!