Eclipse jar packing doesn't accept correct MANIFEST.MF attributesAsk Question


I observed this when I was playing around with Java agent instrumentation. I created my custom MANIFEST.MF file as following:

Manifest-Version: 1.0
Agent-Class: com.i.myproject.MyAgentMain
Premain-Class: com.i.myproject.MyAgentPremain

it seems that it's not taking anything after the second line. Is this a bug, does anyone know?


It seems that without having these three as a minimum, it is not going to work properly.

Manifest-Version: 1.0
Created-By: whoever
Build-Jdk: jdk_version

When I added all these first, and included the class information below, it was correctly packed!

标签: jar manifest javaagents
© 2014 TuiCode, Inc.