Play installation for Java

These directions for Play supplement the Java installation directions:

Play 2.3.x, 2.4.x, and 2.5.x installation

Begin with an unzipped distribution containing the start script:

activator clean dist && unzip target/directory/universal/*.zip

Append the -J-javaagent switch when starting your Play app. For example:

cd unzipped/folder; ./bin/scriptname -J-javaagent:path/to/newrelic.jar

If you use Typesafe Activator with Play 2.4.X, add this line to your build.sbt:

javaOptions ++= Seq("-javaagent:/path/to/newrelic.jar")

Play 2.2.x installation

Begin with an unzipped distribution containing the start script:

play clean dist && unzip target/directory/universal/*.zip

Append the -J-javaagent switch when starting your Play app. For example:

cd unzipped/folder; ./bin/scriptname -J-javaagent:path/to/newrelic.jar

To enable page load timing, see Manual instrumentation with Play 2.2.

Play 2.0.x installation

Begin with an unzipped distribution containing the start script:

play clean dist && unzip dist/*.zip

Append the -javaagent switch when starting your Play app. For example:

cd unzipped/folder; chmod a+x start; ./start -javaagent:path/to/newrelic.jar

Play 1.2.4 installation

Append the -javaagent switch when running your Play application. For example:

play run helloworld -javaagent:/full/path/to/newrelic.jar

To enable page load timing, see Manual instrumentation with Play Groovy.

For more help

Join the discussion about Java monitoring in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.