1

Possible Duplicate:
Installing play framework

I am trying to install the Play! Framework on Windows 7. When I type play help at the command line I get the message

‘play’ is not recognized as an internal or external command, operable program or batch file.

It only runs when I am in the path of play directory. I added a system environment variable as shown here. I have never use environment variables before: should this work or is there something else I have to do?

1
  • I think you are doing some mistake while adding the path to play directory.Consider this example:If your play installation folder is by installaton folder I mean the forlder having play.bat .Just add it to PATH enviornment it should look something like this C:\play-2.2.1. Commented Jan 19, 2014 at 6:09

2 Answers 2

2

If you want to call play from anywhere, you should add it to the end of Windows' System variable: Path

The path variable is in the same place you add your system environment variable.

Sign up to request clarification or add additional context in comments.

2 Comments

I did it like the photo in the above link lh5.googleusercontent.com/-EzHTs4_DtYo/T7Cz8aALksI/AAAAAAAAAAU/… Should I do something more?Really apriciate for your reply
I don't use windows so I can't give you a screenshoot. But you should look in system variables and find the variable "Path". Click Edit, and add the play path to the end of it value.
2

You're half way there.

Now that you've created the variable that stores the path for Play, you need to add that variable to your system's path for it to be accessible from the command line.

In the same list of system variables (where your new variable resides), find the 'Path' variable, and add the variable name you created for the Play framework location, surrounded by %.

For example, if your new variable is called Plat (as your screenshot shows), then you'd edit your Path variable to look something like this:

[previous path element];%Plat%

Keep in mind that the semicolon separates variables in your path, so if you need to add additional variables, be sure to use the semicolon on both ends of your variable.

Just as an FYI, you can also skip the step you've already done (creating a new environment variable) and simply add the path to your installation of Play directly to the Path:

[previous path element];C:\webapp\Play

Both implementations will achieve the same result; creating a variable first just simplifies the re-use of the path in other variables.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.