Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED

Upgrade to IntelliJ idea 2021.2 and start the project with an error

Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED

Solution: delete the. Idea folder and re import the project.

Recommended solution:

Change the red box to your JDK version. Mine is 1.8, so check 8. If this problem cannot be solved, use the above solution again.

 

Read More: