I get the error below, but I can find the package in rt.jar. I can see the JDK being used from Project Structure. I'm not sure what's missing.
Error:(6, -1) Play 2 Compiler:
C:\user\projects\portal\app\com\example\security\cert\X509Cert.java:6: package sun.security.pkcs10 does not exist
import sun.security.pkcs10.*;
C:\user\projects\portal\app\com\v\security\cert\GenerateCSR.java:75: cannot find symbol
I had similar issue with different package:
package sun.security.x509 does not exist
I used java 11 to compile the project.
In my case I had to disable Use '--release' option for cross-compilation
in Java Compiler settings.
Your project SDK version under file>project structure>Project>Project SDK must be the same with your java compiler project bytecode version under file>Build, Execution, Deployment>Compiler>Java Compiler> look for "project bytecode version" right under your checkbox for "use '--release....'"
1.Project SDK version:
2.Project Bytecode version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With