Reputation: 19
I am using itext library to know whether the pdf file is protected or not. i am also add boncycastle library to my class path but it still showing error:
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.DEREncodable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
Upvotes: 0
Views: 210
Reputation: 7623
Put this library in your classpath bcprov-jdk15on-1.47.jar
UPDATE
Mind your bouncy castle dependencies version according to the IText version you are using. To double check it with maven repositories. eg. here or here
Upvotes: 1