Skip to content

Tag: manifest

Get jar manifest attributes from Java agent

I am running my own java agent on a jar containing some sample code. Input to the command line: I’m currently providing the sample-code.jar’s main class (as stated in its manifest) as an arg to the agent, although, I’m trying to find a way to access the sample-code.jar’s manifest’s Main-Class attribute from within the agent’s premain. I tried some of

SpringBoot no main manifest attribute (maven)

When running my jar file: java -jar target/places-1.0-SNAPSHOT.jar I’m getting the next error : no main manifest attribute, in target/places-1.0-SNAPSHOT.jar The pom.xml contains the spring-boot-maven-plugin: I also tried to create a MANIFEST.MF file and specifying the class, but it didnt help. In addition, I also tried: Main class: Any idea what else can I try? Answer Try adding repackage goal