How do I unsign a jar?

Jason picture Jason · Oct 13, 2011 · Viewed 25.5k times · Source

Is there a way to unsign a java jar file? I have some signed jars I'm trying to use in my development environment, but I get security exceptions, so I want to unsign those jars and I can sign them later when I'm ready to deploy.

Answer

DwB picture DwB · Oct 13, 2011

I don't know the answer, but here is what I would do:

  1. Unzip the jar file or files in question (jars are just zips)
  2. Look in the META-INF directory for something that was not MANIFEST-MF.
  3. Delete that stuff.
  4. Open the MANIFEST-MF and remove stuff that looked like it was signature related.
  5. rejar.