This document details how to download and install the Java agent. Before installing the agent, review the Java agent compatibility and requirements. To learn more about what New Relic APM for Java does, see Introduction to New Relic for Java.
This document is for standard Java agent installation. However, some tools have separate installation docs. See: Google App Engine Flexible installation, Heroku installation, Maven installation, or Scala installation.
Download the agent
To download the Java agent:
From the account dropdown in the New Relic UI, select Account settings.
In the right sidebar, download the agent for your platform.
The downloaded zip file includes two required files for installation:
newrelic.jar: This contains the agent class files.
newrelic.yml: This contains configuration information for the New Relic agent, including your license key, application name, SSL settings, etc. New Relic recommends you change the default
newrelic.ymlfile permissions to be read/write only for the owner of the app server process.
On server startup, the agent searches for
newrelic.yml in the directory that contains
newrelic.jar. New Relic writes the agent log to a sub-directory in the same location, named
Install the agent
To install the Java agent:
- In your app server's root directory, create a new directory named
Unpack the agent zip file you downloaded into the
newrelic.yml, set the
app_namesetting to a meaningful name.
Back up the
Pass this switch to the JVM (for detailed instructions for your framework, see Include the Java agent with a JVM argument):
If you use these tools or frameworks, see these documents for additional steps:
- Start or restart your app server.
After you install the agent on your Java app, here are some suggested next steps:
- View your app in New Relic and get comfortable with the user interface.
- Read documentation about New Relic APM. For example, read about the Overview page, the JVM metrics page, the Transactions page, and other performance monitoring features.
- Query your data in New Relic Insights with the event explorer.
- Learn about setting up custom instrumentation for application activity not monitored by default. Or if you use async, learn about async instrumentation.