# I can not set up the agent with application servers

**URL:** <https://discuss.elastic.co/t/i-can-not-set-up-the-agent-with-application-servers/232297>\
**Category:** APM\
**Tags:** java\
**Created:** [May 12, 2020, 6:29pm UTC](https://discuss.elastic.co/t/i-can-not-set-up-the-agent-with-application-servers/232297 "2020-05-12T18:29:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serge2020](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Serge2020](https://discuss.elastic.co/u/Serge2020)\
**Post date:** [May 12, 2020, 6:29pm UTC](https://discuss.elastic.co/t/i-can-not-set-up-the-agent-with-application-servers/232297/1 "2020-05-12T18:29:55Z")

</div>

**Kibana version** :7.6.2

**Elasticsearch version** :7.6.2

**APM Server version** :7.6.2

**APM Agent language and version** :elastic-apm-agent-1.15.0.jar

**Browser version** : google

\*\*Original install method: repository for APT "apt-get install apm-server"

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
Hi all:  
I've been trying to install APM Java agent, everything goes great until this part:

 ![java agent](https://us1.discourse-cdn.com/elastic/original/3X/f/c/fccb54a9aea2ce39f037d94423753e7a97f19127.jpeg)

I don't know where I have to set required service name; but actually if I ignore that step and continue I have this error where I don't know what I have to put in the last instruction.

 ![error](https://us1.discourse-cdn.com/elastic/original/3X/5/e/5e89958f9ba02a60ac4803671bb4dbfbc34effd0.jpeg)

I hope you can help me please!

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [May 13, 2020, 2:08am UTC](https://discuss.elastic.co/t/i-can-not-set-up-the-agent-with-application-servers/232297/2 "2020-05-13T02:08:19Z")

</div>

The `java -javaagent:...` command in step 5 is a template. You will need to adapt it to your application:

- Change "-javaagent:/path/to/elastic-apm-agent-1.15.0.jar" to the location of the agent jar, which you downloaded in step 4.
- Change "my-application.jar" to the jar for your application. This assumes that you're directly running the application with `java -jar`.

You can find more detailed instructions for setting up the Java agent at [https://www.elastic.co/guide/en/apm/agent/java/current/setup.html](https://www.elastic.co/guide/en/apm/agent/java/current/setup.html).

---

<div class="post-metadata">

**Author:** ![Serge2020](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Serge2020](https://discuss.elastic.co/u/Serge2020)\
**Post date:** [May 14, 2020, 3:20pm UTC](https://discuss.elastic.co/t/i-can-not-set-up-the-agent-with-application-servers/232297/3 "2020-05-14T15:20:39Z")

</div>

Thank you very much, you really help me!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 4, 2020, 11:20am UTC](https://discuss.elastic.co/t/i-can-not-set-up-the-agent-with-application-servers/232297/4 "2020-06-04T11:20:45Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
