![]() ![]() Select the module for which you want to add a library and click Dependencies. Global and project libraries are not available until you add them to module dependencies. In this case, only one module can use the code from such libraries. You can add libraries on the module level. Libraries are a collection of compiled code that you can use when developing applications. This helps increase overall IDE performance. Select the Exclude output path checkbox to exclude the output folders from code completion, navigation, and inspections. Under Project Settings, select Modules | Paths.Ĭhange the paths specified in the Output path and Test output path or select Inherit project compile output path to use the paths specified for the project. In this directory, the IDE creates two sub-directories: output for production code and test output for test sources. To use the project language level, select Project default.Ĭompiler output path is the path to the directory in which IntelliJ IDEA stores the compilation results. Under Project Settings, select Modules | Sources.įrom the Language level list, select the necessary option. To configure a language level for a module: Configure module language levelįrom the main menu, select File | Project Structure Control+Alt+Shift+S. Language level defines coding assistance features that the editor provides. This protects you from a situation when a module is compiled against newer libraries than those for which dependencies are set. This limitation is related to the fact that the compiler API used by IntelliJ IDEA for building projects is supported starting from JDK 1.6.Īlthough a specific version of the compiler will be used (in accordance with the selected JDK version), each separate module will be compiled using the javac's cross-compilation feature against the libraries of the JDK defined for this particular module in the project settings. If the version of the latest JDK configured is lower than 1.6, IntelliJ IDEA will pick the JDK version that is used for running the IDE. This is necessary to make sure all modules can be compiled. It checks all JDKs that are used in the project: the JDKs that are defined on both the project and module levels. IntelliJ IDEA does the following to determine which JDK to use for compilation if you use different JDKs for modules in your project. How does IntelliJ IDEA know which JDK to use? If you want a module to inherit a project SDK, select the Project SDK option from the Module SDK list. In the next dialog, specify the JDK vendor, version, change the installation path if required, and click Download. Only for JDKs: If you don't have the necessary JDK on your computer, select Add SDK | Download JDK. If the SDK is installed on your computer, but not defined in the IDE, select Add SDK | 'SDK name', and specify the path to the SDK home directory. If the necessary SDK is already defined in IntelliJ IDEA, select it from the Module SDK list. Select the module for which you want to set an SDK and click Dependencies. Module SDKįrom the main menu, select File | Project Structure | Project Settings | Modules. You can compile a module with an SDK that differs from the project SDK. To develop Java-based applications, you need a JDK (Java Development Kit). Module SDKĪn SDK is a collection of tools that you need to develop an application for a specific software framework. ![]() They can also carry a specific technology or a framework. A module can have an SDK and a language level that are different from those configured for a project, and their own libraries. Module settings apply only to one module and are stored in the. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |