0

I had to alter some source in org.eclipse.jdt.core.dom.ASTNode, I used various eclipse plugins as "headless" libraries in a application design to re-factor source code in a specific way.

I only discovered right at the very end that there was a line of code in ASTNode, that makes the application impossible.

The fastest way seemed to be to decompile comment out the line and pack the jar again. The problem I now have is:

Exception in thread "main" java.lang.SecurityException: SHA1 digest error for org/eclipse/jdt/core/dom/ASTNode.class
at sun.security.util.ManifestEntryVerifier.verify(ManifestEntryVerifier.java:198)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:212)
at java.util.jar.JarVerifier.update(JarVerifier.java:199)

This application only needs to run once to refactor a large code base. I'm looking for the quickest solution.

If there is some way to disable the security, in fact there is with a start up argument:

startup option -Declipse.p2.unsignedPolicy=allow

this doesn't help me since the libraries are headless. The other possible solution is to resign the jar but I assume a key would be needed or something.

Since it's a disposable application I don't need a clean fix, just anything that is quick.

1 Answer 1

0

the way to sign jar is using Java -cp option like below

java -cp "jcifs-1.3.17.jar:jespa-1.1.14.jar" jespa.License -u jespa_500_license_SN2136020120531.key
2
  • so you can sign it with your own key, not a key that may be related to other libraries or eclipse itself. If I can simple unjar a library change it then, resign it, what good is jar signing as in terms of ant-tamper security devices? I don't really care but I don't wanna waste time on possible dead ends
    – justify
    Nov 17, 2012 at 9:47
  • you need eclipse key for signing check this out wiki.eclipse.org/JAR_Signing Nov 17, 2012 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.