# Error opening zip file or JAR manifest missing : elastic-apm-agent-1.7.0.jar

**URL:** <https://discuss.elastic.co/t/error-opening-zip-file-or-jar-manifest-missing-elastic-apm-agent-1-7-0-jar/192991>\
**Category:** APM\
**Tags:** java, server\
**Created:** [July 30, 2019, 8:53pm UTC](https://discuss.elastic.co/t/error-opening-zip-file-or-jar-manifest-missing-elastic-apm-agent-1-7-0-jar/192991 "2019-07-30T20:53:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hikozzaru](https://avatars.discourse-cdn.com/v4/letter/h/45deac/32.png) [@hikozzaru](https://discuss.elastic.co/u/hikozzaru)\
**Post date:** [July 30, 2019, 8:53pm UTC](https://discuss.elastic.co/t/error-opening-zip-file-or-jar-manifest-missing-elastic-apm-agent-1-7-0-jar/192991/1 "2019-07-30T20:53:25Z")

</div>

**APM Agent language and version** :  
Java-1.7.0  
**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:  
[https://search.maven.org/search?q=a:elastic-apm-agent](https://search.maven.org/search?q=a:elastic-apm-agent)  
**Fresh install or upgraded from other version?**  
Fresh install  
**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
When I try to run

/usr/local/java/jdk1.8.0\_171/bin/java -XX:+UseG1GC -Xms512m -Xmx768m -javaagent:~/elastic-apm-agent-1.7.0.jar \ -Delastic.apm.service\_name=authenticatio  
n-api-node2 \ -Delastic.apm.server\_url=http://localhost:8200 \ -Delastic.apm.secret\_token= \ -Delastic.apm.application\_packages=com.digitalfactory.kerberos.authenticationapi \ -j  
ar /usr/local/project/api/authentication-api-node2/authentication-api-node2.jar

server shows me on console the follow:

Error opening zip file or JAR manifest missing : ~/elastic-apm-agent-1.7.0.jar  
Error occurred during initialization of VM  
agent library failed to init: instrument

**Provide logs and/or server output (if relevant)**:

Error opening zip file or JAR manifest missing : ~/elastic-apm-agent-1.7.0.jar  
Error occurred during initialization of VM  
agent library failed to init: instrument

---

<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:** [July 31, 2019, 12:23am UTC](https://discuss.elastic.co/t/error-opening-zip-file-or-jar-manifest-missing-elastic-apm-agent-1-7-0-jar/192991/2 "2019-07-31T00:23:55Z")

</div>

Welcome to the forum @hikozzaru, and thanks for checking out Elastic APM!

The problem here is that `-javaagent` does not expand "~" in jar paths. You will need to pass in the full path.

---

<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:** [August 21, 2019, 10:28am UTC](https://discuss.elastic.co/t/error-opening-zip-file-or-jar-manifest-missing-elastic-apm-agent-1-7-0-jar/192991/5 "2019-08-21T10:28:22Z")

</div>

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