I have got an error:
InvalidKeyException Illegal Key Size
Then I download 2 files(local_policy, US_export_policy) and put it in
C:\\Program Files\\Java\\jre1.8.0_65\\lib\\security
everithing worked fine. But when i export project to
Runnable jar file
and then open this jar i have error in my app :
InvalidKeyException Illegal Key Size
Why it happen? I dont know how to fix this?
You can solve it by two ways:
You have already put 2 files(local_policy, US_export_policy) in
C:\Program Files\Java\jre1.8.0_65\lib\security
You also need to put it in
C:\Program Files\Java\lib\security
You need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files which is available at Oracle .
If you don't then the keysize is limited due to US export laws.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.