IDE

How to enable partial compilation in IDEA

Posted by Java developer blog on July 18, 2020

Overview

Sometimes you may want to run a main method in one particular class despite having some errors in a project. IntelliJ IDEA prevents you from it by default. In the post, we are going to discuss how to enable partial compilation in IDEA.

Enable partial compilation in IDEA

You need to switch to Eclipse compiler to do that. Simply open IDEA Settings | Build, Execution, Deployment | Compiler | Java compiler and choose Eclipse compiler. Eclipse compiler has an option to Proceed on errors by default.

You could look at the screenshot below

Conclusion

We have discussed how to enable partial compilation in IDEA.