4

After JDK update (8u11 -> 8u20) my code stopped compiling. These classes become unavailable:

import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;

Was javax.crypto package was removed from latest Oracle JDK? I cannot find any information about it.

Can I solve this problem by adding some library?

bigGuy
  • 1,732
  • 1
  • 22
  • 37
  • 1
    It would be a highly unusual move for Oracle to remove a non-deprecated class without making it very clearly known that it was going to happen. As far as I can tell it's still there, and the [official JavaDoc entry](http://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html) doesn't indicate that it's removed. – JonK Aug 20 '14 at 11:55
  • Im not from USA, so maybe some crypto export restrictions? – bigGuy Aug 20 '14 at 11:56
  • 1
    You don't get different versions of the code based on your location. 1.8.0_20 has the same content no matter where you download it from. – JonK Aug 20 '14 at 11:59

1 Answers1

2

These libraries are in the Oracle JDK 8u20 for sure. Here's my advice for you:

  • Make sure you download Oracle JDK form Oracle site.
  • Create some really small project with using missed classes without any other libraries and try to compile it with newly downloaded JDK (try to use simple console commands to compile and run it, that's how you will be sure your IDE does not mess up with libraries).
  • If previous step succeed try to link just tested JDK to your project, pay close attention to IDE settings and make sure you link it properly.

Good luck!

nkukhar
  • 1,975
  • 2
  • 18
  • 37