Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find or load main class #219

Closed
sharanraj124 opened this issue Sep 20, 2018 · 5 comments
Closed

Could not find or load main class #219

sharanraj124 opened this issue Sep 20, 2018 · 5 comments
Assignees

Comments

@sharanraj124
Copy link

i am run this agent I got some issues

java \ -javaagent:/Users/appleapple/Downloads/elastic-apm-agent-0.7.0.jar\ -Delastic.apm.service_name=samplespringbootapp\ -Delastic.apm.server_url=http://localhost:8200\ -Delastic.apm.application_packages=org.example\ -jar samplespringbootapp.jar
Error: Could not find or load main class  -javaagent:.Users.appleapple.Downloads.elastic-apm-agent-0.7.0.jar -Delastic.apm.service_name=samplespringbootapp -Delastic.apm.server_url=http:..localhost:8200 -Delastic.apm.application_packages=org.example -jar
Caused by: java.lang.ClassNotFoundException:  -javaagent:/Users/appleapple/Downloads/elastic-apm-agent-0/7/0/jar -Delastic/apm/service_name=samplespringbootapp -Delastic/apm/server_url=http://localhost:8200 -Delastic/apm/application_packages=org/example -jar
@felixbarny
Copy link
Member

Hi and thanks for trying out the agent!
If you want to run the command in a single line, remove the backslashes.

@sharanraj124
Copy link
Author

this is not working..

@felixbarny
Copy link
Member

Could you be a bit more specific? What is not working? Do you get any error messages?

Have you tried:

java  -javaagent:/Users/appleapple/Downloads/elastic-apm-agent-0.7.0.jar -Delastic.apm.service_name=samplespringbootapp -Delastic.apm.server_url=http://localhost:8200 -Delastic.apm.application_packages=org.example -jar samplespringbootapp.jar

@sharanraj124
Copy link
Author

ya I tried but still this error is showing..

java  -javaagent:/Users/appleapple/Downloads/elastic-apm-agent-0.7.0.jar -Delastic.apm.service_name=samplespringbootapp -Delastic.apm.server_url=http://localhost:8200 -Delastic.apm.application_packages=org.example -jar samplespringbootapp.jar
Error: Unable to access jarfile samplespringbootapp.jar

@felixbarny
Copy link
Member

Seems like your current folder does not contain a file named samplespringbootapp.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants