You are not logged in.
Pages: 1
Topic closed
Hi,
Basically I just need to compile this code :
import java.security.*;
import javax.crypto.*;
public class BlockCipherEngine {
public static void main(String[] args) {
Security.addProvider( new org.bouncycastle.jce.provider.BouncyCastleProvider() );
Cipher cipher = Cipher.getInstance("AES", "BC");
}
}But I get the following :
package org.bouncycastle.jce.provider does not existI installed bcprov and added /usr/share/bcprov.jar to my $CLASSPATH.
What should I do ?
Thanks.
Offline
bcprov installs to /usr/share/java/bcprov.jar not /usr/shar/bcprov.jar
adjust your CLASSPATH and try again?
Offline
Are you using Maven? If so, that class `org.bouncycastle.jce.provider.BouncyCastleProvider` is actually found in `bcprov-lts8on`, which you can add using:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-lts8on</artifactId>
<version>2.73.11</version>
</dependency>If you ever find yourself not knowing which dependency a particular class came from in the future, you can use https://central.sonatype.com/ and search `fc:fully.qualified.name.of.Clazz` to identify dependencies that provide it. You can filter it even further if you know the group id, as I did in your case, using `g:org.bouncycastle fc:org.bouncycastle.jce.provider.BouncyCastleProvider`. There are a ton of results, but `bcprov-lts8on` is the one you want as it's the LTS version aimed for Java 8 and higher.
Last edited by prittspadelord (2026-05-15 18:38:42)
Offline
You did realise this thread is 15 years old ?
Please read https://wiki.archlinux.org/title/Genera … bumping%22
Moderator Note
Closing this old thread.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Pages: 1
Topic closed