. Advertisement .
..3..
. Advertisement .
..4..
The error: “Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED In Java Intellij IDEA” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
When Does The Error: “Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED In Java Intellij IDEA” Happen?
When working on your project, you may get the following problem:
Unrecognized option: --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
You have encountered the error “Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED In Java Intellij IDEA” because the language level of the project has changed from 8 to 16 by IntelliJ IDEA.
How To Solve The Error: “Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED In Java Intellij IDEA”?
Approach 1: Remove the .idea
The project-specific settings files for IntelliJ are located in the .idea folder (which is hidden on OS X) of solution root’s. These comprise particular information to each project, such as VCS mapping, run and debug configurations, and information specific to each user, such as open files at presnt, past navigation, and the configuration that is now being used.
The easiest way to solve the error “Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED In Java Intellij IDEA” is that you simply need to remove the .idea folder and then re-import your project. Here’s how many people got around their problem.
Although this is a simple method, it works perfectly. After doing that, your error will be completely resolved. Let’s do it to get your desired results.
Approach 2: Simply modify the project language level
If you recently upgraded IntelliJ IDEA, some configurations will be auto-updated by IntelliJ IDEA. So, for the time being, the only solution is to return to JDK8. To return to JDK8, follow these instructions.
- Select Project Structure from the File menu. Simply select Project Settings from the left tree.
- Then, choose a project.
- Take a look at the language level of the project.
- It was changed from 8 to 16 by IntelliJ IDEA.
- That’s why you’re having trouble.
- Put it back to 8.
- Now, you have fixed your problem.
After you finish these steps, your error will disappear and your program will run well without any errors.
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “Unrecognized option: –add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED In Java Intellij IDEA” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Read more
Leave a comment