

IntelliJ IDEA also recursively builds the classes' dependencies.

When you change any class inside the build target and then execute the build action, IntelliJ IDEA performs the incremental build that compiles only the changed classes. When you execute the Build command, IntelliJ IDEA compiles all the classes inside your build target and places them inside the output directory. Change the location of the output folder under the Compiler output section. In Project Settings, select Project and in the Project compiler output field, specify the corresponding path.įor modules, select Modules, the module you need and the Paths tab. Open the Project Structure dialog ( File | Project Structure Ctrl+Alt+Shift+S). If you do so (say, specify some instead of /out) but don't redefine the paths at the module level, the compilation results will go to /production/ and /test/.Īt the module level, you can specify any desirable compilation output location for the module sources and tests individually. The default paths for subdirectories are as follows:Īt the project level, you can change the /out part of the output path. Inside the output directory, IntelliJ IDEA also creates subdirectories for each of your modules. When you compile your source code, IntelliJ IDEA automatically creates an output directory that contains compiled.

If errors occur during the compilation process, IntelliJ IDEA will display them in the Review compilation and build output along with warning messages. Open the needed file in the editor and from the main menu, select Build | Recompile 'class name' ( Ctrl+Shift+F9).Īlternatively, in the Project tool window, right-click the class you need and from the context menu, select Recompile 'class name'. In this case, the build delegation to Gradle or Maven can help you build your project correctly. However, IntelliJ IDEA native builder might not correctly build the Gradle or Maven project if its build script file uses custom plugins or tasks. If you have a pure Java or a Kotlin project we recommend that you use IntelliJ IDEA to build your project since IntelliJ IDEA supports the incremental build which significantly speeds up the building process. You can compile a single file, use the incremental build for a module or a project, and rebuild a project from scratch. IntelliJ IDEA uses a compiler that works according to the Java specification. The IntelliJ IDEA compilation and building process compiles source files and brings together external libraries, properties files, and configurations to produce a living application. Compile and build applications with IntelliJ IDEA
