1.找到本机JDK安装目录,将 com.springsource.org.bouncycastle.jce-1.46.0.jar(该文件在当前目录下) 复制到 jre/lib/ext/ 目录下
2.用文本编辑器打开 /jre/lib/security/java.security (注意备份),找到以下代码:
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=sun.security.ec.SunEC
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider
security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.9=sun.security.smartcardio.SunPCSC
security.provider.10=sun.security.mscapi.SunMSCAPI
将 security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider 复制到 security.provider.1=sun.security.provider.Sun 之后,从security.provider.2=sun.security.rsa.SunRsaSign开始往下每一行的数字都加1,如下:
security.provider.1=sun.security.provider.Sun
security.provider.2=org.bouncycastle.jce.provider.BouncyCastleProvider
security.provider.3=sun.security.rsa.SunRsaSign
security.provider.4=sun.security.ec.SunEC
security.provider.5=com.sun.net.ssl.internal.ssl.Provider
security.provider.6=com.sun.crypto.provider.SunJCE
security.provider.7=sun.security.jgss.SunProvider
security.provider.8=com.sun.security.sasl.Provider
security.provider.9=org.jcp.xml.dsig.internal.dom.XMLDSigRI
security.provider.10=sun.security.smartcardio.SunPCSC
security.provider.11=sun.security.mscapi.SunMSCAPI
最后保存即可;
Markdown很好用哦!