How to add library for BouncyCastleProvider Security

前提是你 提交于 2021-01-29 13:36:18

问题


I am confuse where add jar file (bcprov-jdk15-145.jar) for adding security file for BouncyCastleProvider. In application library or In JRE jre6\lib\ext\ folder.

    Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

回答1:


Unless you have a specific reason for adding a JAR file to the JRE's lib/ext directory don't put anything in there. This directory is for Installed Extensions, not just dependencies of your application.

Just add the bcprov-jdk15-145.jar file to the Classpath of your application.




回答2:


The generic answer would be: "On the classpath". Most often that would be with your application, eg. within an EAR or WAR file.

Cheers,



来源:https://stackoverflow.com/questions/13049720/how-to-add-library-for-bouncycastleprovider-security

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!