Skip to main content

How to install play framework

Prerequisites

To run the Play framework, you need JDK 6 or later.
If you are using MacOS, Java is built-in. If you are using Linux, make sure to use either the Sun JDK or OpenJDK (and not gcj, which is the default Java command on many Linux distros). If you are using Windows, just download and install the latest JDK package.
Note, Java 7 pre update 9 on MacOS has a bug that causes problems with futures and iteratees, including making large file uploads hang. If using Java 7 on MacOS, make sure you are using the latest version.
Be sure to have the java and javac commands in the current path (you can check this by typing java -version and javac -version at the shell prompt).

Download the binary package

Download the latest Play standalone distribution and extract the archive to a location where you have both read and write access. (Running play writes some files to directories within the archive, so don’t install to /opt, /usr/local or anywhere else you’d need special permission to write to.)


Add the play script to your PATH

For convenience, you should add the framework installation directory to your system PATH. On UNIX systems, this means doing something like:
export PATH=$PATH:/relativePath/to/play
On Windows you’ll need to set it in the global environment variables. This means update the PATH in the environment variables and don’t use a path with spaces.
If you’re on UNIX, make sure that the play script is executable.
Otherwise do a:
bash chmod a+x play chmod a+x framework/build
If you’re behind a proxy make sure to define it with set HTTP_PROXY=http://<host>:<port> on Windows or export HTTP_PROXY=http://<host>:<port> on UNIX.

Check that the play command is available

From a shell, launch the play help command.
$ play help
If everything is properly installed, you should see the basic help:




Comments

Popular posts from this blog

JavaMelody: Monitoring the Performance of Tomcat Application Server

Javamelody is an opensource (LGPL) application to monitor Java or Java EE application servers in QA and production environments. JavaMelody is mainly based on statistics of requests and on evolution charts. (Extract from the Javamelody home page) It allows to improve applications in QA and production Give facts about the average response times and number of executions Make decisions when trends are bad, before problems become too serious Optimize based on the more limiting response times Find the root causes of response times Verify the real improvement after optimization It includes summary charts showing the evolution over time of the following indicators: Number of executions, mean execution times and percentage of errors of http requests, sql requests, jsp pages or methods of business façades (if EJB3, Spring or Guice) Java memory Java CPU Number of user sessions Number of jdbc connections These charts can be viewed on the current day, week, month, year or cu

Configuring URL Encoding on Tomcat Application Server

Application servers may have different settings for character encodings. We strongly recommend UTF-8 where possible. By default, Tomcat uses ISO-8859-1 character encoding when decoding URLs received from a browser. This can cause problems when Confluence's encoding is UTF-8, and you are using international characters in the names of attachments or pages. To configure the URL encoding in Tomcat: Step 1 - Configure connector: Edit conf/server.xml and find the line where the Coyote HTTP Connector is defined. It will look something like this, possibly with more parameters: < Connector port = "8080" /> Add a URIEncoding="UTF-8" property to the connector: < Connector port = "8080" protocol = "HTTP/1.1"      connectionTimeout = "20000"      redirectPort = "8443"      URIEncoding = "UTF-8" /> If you are using mod_jk you should appl

Set Up Nginx Load Balancing

About Load Balancing Loadbalancing is a useful mechanism to distribute incoming traffic around several capable Virtual Private servers. By apportioning the processing mechanism to several machines, redundancy is provided to the application -- ensuring fault tolerance and heightened stability. The Round Robin algorithm for load balancing sends visitors to one of a set of IPs. At its most basic level Round Robin, which is fairly easy to implement, distributes server load without implementing considering more nuanced factors like server response time and the visitors’ geographic region. Setup The steps in this tutorial require the user to have root privileges on your VPS. Prior to setting up nginx loadbalancing, you should have nginx installed on your VPS. You can install it quickly with apt-get: sudo apt-get install nginx Upstream Module In order to set up a round robin load balancer, we will need to use the nginx upstream module. We will incorporate the conf