Question

I have manually added some class files in jar. and replaced in server. But server didn't come up with this new jar saying : java.lang.SecurityException: class "test.TestProcess2"'s signer information does not match signer information of other classes in the same package.

Do i need to sign the jar after updation and how to do the same.

Thanks in advance

Was it helpful?

Solution

Yes.

You can also sign the jar manually for the command line. For example, in windows it looks moreless liek that:

"{YOUR_JDK_INSTALL_PATH}\bin\jarsigner.exe" -verbose -keystore {YOUR_KEYSTORE_PATH} -storepass {YOUR_STORE_PASS} -keypass {YOUR_KEY_PASS} {JAR_FILE}

OTHER TIPS

Do i need to sign the jar after updating?

Sure, it is the point of signing jars that the content is not modified by some else except you. If you modify it manually, then you have to resign.

In my case I use Eclipse and Ant to build the project. So the jar gets resigned every time I rebuild the project.

<signjar jar="myapplet.jar" keystore="myKeyStore" alias="me" storepass="pass"/>

The problem is that the other classes in your JAR are signed differently than the classes that you added. Either don't sign the entire JAR or resign the JAR after you add the new classes. You can find information on the jarsigner tool here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top