[Solved] IDEA error: sun.security.pkcs not found

Abnormal scene

When Java 8 switches to Java 11, there is an error and sun is not found security 。

Problem analysis

Jar package and source code are available. The probability is due to the security policy in the new JDK.

Solution:

In the compiler’s settings -> Build,Execution -> Compiler-> Disable in Java compiler:

Use ‘–release’ option for cross-compilation

Then rebuild

If there is no exception after build, check it again.

Read More: