Joke Collection Website - Blessing messages - Why should the Jar file of Java SE be signed? What situation requires signature and what role does it play? Can I not sign it?

Why should the Jar file of Java SE be signed? What situation requires signature and what role does it play? Can I not sign it?

Usually, signature is to use some restricted functions on a specific platform. These functions are not public in java, or although they are public, they modify the underlying code themselves, so this function needs some permissions at runtime. When running according to the standard code, jar will throw an exception, usually a security exception, when executing this function because of insufficient permissions, which will cause jar to fail to run.

The solution to this situation is signature, which gives jar the right to execute this kind of code. After signing, jar can run functions supported by signature, and when jar executes these functions, there will be no exception.

No signature is required. Because few people will build a platform that meets their own needs by modifying the underlying java code, this higher or lower level function is usually realized by using jar packages. If you don't need this jar package, you don't have to sign it at all. If you have to use it, you basically have to sign it.

Simply put, signature is usually to obtain the executive right to perform sensitive functions.