you can add security provider by editing java.security by adding security.provider.=org.bouncycastle.jce.provider.BouncyCastleProvider
or add a line in your top of your class
Security.addProvider(new BouncyCastleProvider());
you can use below line to specify provider while specifying algorithms
Cipher cipher = Cipher.getInstance("AES", "SunJCE");
if you are using other provider like Bouncy Castle then
Cipher cipher = Cipher.getInstance("AES", "BC");