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?

回答1:


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.