0

I want to install the bouncy castle security.

so. when I try to move bcprov-jdk13-164.jar file, but ext folder in locate $JAVA_HOME/jre/lib is not existed. and any other folers are same that.

I need to find this directory or how to installing and using. Thanks!

김동균
  • 33
  • 1
  • 5
  • 4
    No you don't. What you are trying to do is unnecessary and has been advised against for almost as long as Java exists. If an application needs a library, bundle it with the application. – Gimby Jan 17 '20 at 12:10
  • @Gimby so. I don't need to install bouncycastle jar file? I don't understand well.. I try to add this file from java build path, but when I compiled, console show the error massage : java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider , how can import to use library? – 김동균 Jan 17 '20 at 12:31

1 Answers1

2

I need to find this directory or how to installing and using.

Support for the "lib/ext" directory was removed in Java 9; see "Java Platform, Standard Edition Oracle JDK 9 Migration Guide: Removed Extension Mechanism"

You now need to add any 3rd-party JAR files to the application's classpath:

  • the build classpath if there are compile time dependencies,
  • the runtime classpath if there are runtime dependencies.

If you are trying to use Bouncy Castle in a web container, the JAR needs to be in the container's lib directory rather than in the webapp directory.

(Instructions you may find for installing Bouncy Castle JCE providers into "lib/ext" on Java 8 are not applicable for later Java releases.)

Adrian
  • 2,984
  • 15
  • 27
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216