You need to --add-modules jdk.crypto.cryptoki in addition to the --add-exports to the erroring module by going to Settings/Build, Execution, Deployment/Compiler/Java Compiler and Override compiler parameters per-module for the failing module.