Solve the error Cannot start compilation: the output path is not specified for module “xxxxx“ when running IDEA.



Friendly reminder:

First look at the article directory to get a general understanding of the structure of the article's knowledge points. Click on the article directory to jump directly to the specified location of the article.


Chapter 1, Problem Analysis

1.1) Error message

报错如下:Cannot start compilation: the output path is not specified for module "xxxxx". Specify the output path in the Project Structure dialog.
Translated into Chinese: Unable to start compilation: No output path specified for module "xxxx", specify the output path in the "Project Structure" dialog.

1.2) Analysis of the cause of the error

The reason for the error is: the import of external projects into the local lacks the corresponding configuration, that is, the path of the output out file is not specified. The idea needs to generate an out directory under the project, which will store the bytecode file (.class) after the java file is run.

Chapter Two, Solutions

2.1) Open IDEA settings


①Open IDEA—>file—>project structure

idea

②Select project, set the out file directory location

insert image description here


③ restart the idea

Guess you like

Origin blog.csdn.net/baomingshu/article/details/131964226