Intellij IDEA does not check other classes for errors before running

 

 

Problem Description

write picture description here

MainClass is a normal class to be run. There is a class ErrorClass in the directory. There is an error, and it will not run when MainClass is run. Now you need to ignore the error in ErrorClass and execute the code in MainClass.

Solution

first step

write picture description here

second step

In the toolbar select, Run Configurations 
write picture description here

Set to not check for errors before running 
write picture description here

 

 

 

Unit testing notes:

The return value must be void, not a static method

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325217435&siteId=291194637