How to sign a jar to never expire?

I used jarsigner to sign my jar file. But I got a warning:

 Warning: This jar contains entries whose signer certificate will expire within six months. 

How can I make it never expire or expire for a longer time?

+7
source share
1 answer

Specify the required number of days in the -validity parameter in keytool .

Application: -validity is a keytool option.

 keytool -genkey -alias sawyer -validity 1234 -dname "โ€ฆ" 

After creating a new key, use your unique alias jarsigner to sign the JAR.

+7
source

All Articles