question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not find or load main class

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
felixbarnycommented, Sep 21, 2018

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
0reactions
felixbarnycommented, Sep 21, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java Guide: How to Fix "Could not find or load main class"
The Java “Could not find or load main class” error is thrown when the JVM fails to find or load the main class...
Read more >
java - What does "Could not find or load main class" mean?
When you get the message "Could not find or load main class ...", that means that the first step has failed. The java...
Read more >
Java – “Could Not Find or Load Main Class” Error | Baeldung
And it failed with the error “Could not find or load main class helloworld.” As discussed earlier, the compiler will generate the .class...
Read more >
Error: Could not find or load main class in Java [Solved]
If you are getting "Error: Could not find or load main class XXX", where XXX is the name of your main class while...
Read more >
Could Not Find or Load Main Class in Java - Javatpoint
The class has been declared in the wrong package. · Dependencies missing from the CLASSPATH. · The subdirectory path doesn't match the fully...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found