How to solve the IDEA running program error: Output directory is not specified

This paragraph actually means that the output path is not specified, because you did not create a new module after creating the project in idea, but directly created a java file under src and ran it.

I use IDEA 2022.1 myself

Use this to show how to solve the problem

First, right-click on the IDEA project

Click to open the module settings in the pop-up tab

Select the project column in the opened interface

 Select your jdk in the SDK column

 Then find the directory of your project in the compiler output column, create an out folder in the directory, and enter the path to this folder.

 After the change is completed, it can run normally!

Please give it a like if it is useful, your support is my biggest motivation!

o(*▽*)q

Guess you like

Origin blog.csdn.net/hy123154/article/details/124415953