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.

no main manifest attribute, in jmx_prometheus_javaagent-0.12.0.jar

See original GitHub issue

Hello guys,

I have download the jmx_prometheus_javaagent-0.12.0.jar also version 0.11.0 and also created config.yml file in my linux system. Java 1.8 is installed in my linux system. I was trying to setup jmx_exporter as agent using below command.

java -javaagent:./jmx_prometheus_javaagent-0.12.0.jar=8080:config.yml -jar jmx_prometheus_javaagent-0.12.0.jar

But it gives the error.

no main manifest attribute, in jmx_prometheus_javaagent-0.12.0.jar

Brian please don’t post same answer as you gave to all other people. We are exacting a solution for that from you.

As per your documentation it should work otherwise post the working things.

I request you to post the solution or edit the document and post working things. Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
vabinavcommented, Dec 2, 2021
abinavviswanathan@Abinavs-MacBook-Pro-2 META-INF % cat MANIFEST.MF 
Manifest-Version: 1.0
Implementation-Title: jmx_prometheus_javaagent
Premain-Class: io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent
Implementation-Version: 0.16.1
Archiver-Version: Plexus Archiver
Built-By: fabian
Agent-Class: io.prometheus.jmx.shaded.io.prometheus.jmx.JavaAgent
Created-By: Apache Maven 3.8.1
Build-Jdk: 1.8.0_292

The MANIFEST.MF does not have Main-Class attribute specified.

I believe this is a bug and thus I am getting the error above.

0reactions
erickbrenesscommented, Aug 14, 2021

I have the same issue, and checking the jar I’m trying to scrape I see this in the MANIFEST.MF file

Premain-Class: org.apache.cassandra.infrastructure.continuations.CAgent

The jar doesn’t have a main class like

Main-Class: com.mypackage.MyClass

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't execute jar- file: "no main manifest attribute"
The -jar option only works if the JAR file is an executable JAR file, which means it must have a manifest file with...
Read more >
No Main Manifest Attribute - Javatpoint
No Main Manifest Attribute. In a Java project, every executable jar file contains a main method. Usually, it is placed at starting point...
Read more >
Unable to execute jar- file no main manifest attribute - Edureka
The -jar option only works if the JAR file is an executable JAR file, which means it must have a manifest file with...
Read more >
[Solved] No main manifest attribute, in jar Maven and SpringBoot
This error occurs whenever Main-Class property is missing from manifest file MANIFEST.MF which can be found under META-INF folder in the jar. Correct...
Read more >
Fix Error: no main manifest attribute, in JAR file - YouTube
How to fix error no main manifest attribute, in JavaApplication. jar - How to add main class to JAR file - How to...
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