title: Java Cipher NoSuchPaddingException
body: <p>I'm not very experienced with Java, so this may be a nooby question. I was trying to experiment a bit with Java encryption, but for some reason I can't get an instance of <code>Cipher</code>. I always get a <a href="http://docs.oracle.com/javase/7/docs/api/javax/crypto/NoSuchPaddingException.html" rel="nofollow"><code>NoSuchPaddingException</code></a> on this line, changing the padding to something else, like <code>"/NoPadding"</code> doesn't work:</p>
  
  <pre><code>Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
  </code></pre>
  
  <p>Trying to run the code even though Eclipse says it's wrong results in this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
  Unhandled exception type NoSuchAlgorithmException
  Unhandled exception type NoSuchPaddingException
  
  at Encryption.main(Encryption.java:10)
  </code></pre>
  
  <p>What could be the problem? Do I have to import some certain things? In the current code I <code>import javax.crypto.Cipher</code> and <code>javax.crypto.spec.SecretKeySpec</code>.</p>
  
  <p>When I use Jython the code works by the way.</p>