Introduction to idea
The full name of idea is IntelliJ, which is an integrated development tool launched by JetBrains company. It is a leader in java development tools. Based on this development tool, we can quickly develop our Java related projects. Compared with other development tools, idea provides more powerful prompt function, comprehensive shortcut key operation, template code and rapid resource integration.
Download and install
- Hardware requirements
1) Memory 8g or more
2) If the free space of hard disk is more than 5GB, it is better to have a solid state hard disk.
- Software requirements
1)Microsoft Windows 8 or later
2)macOS 10.13 or later
3)Any Linux distribution
4)Set Up and Config JDK1.8
Download idea tools
The download address of idea official website is as follows:
Based on different operating systems, you can choose ideas under different platforms, for example:
Note: as for the community version (free version with limited functions) / Commercial Version (trial version), it’s up to you.
Idea tools installation
After downloading idea, it needs to be installed and used. If it’s just a downloaded decompressed version, you can copy it to a non Chinese directory, and then decompress it directly for application. If you download the executable program (such as. EXE file under Windows platform), you can directly start the executable program, and then follow the prompts to install step by step.
The official help documents of idea are as follows:
Idea tools start
Find the root directory of the extracted or installed idea, and then enter the bin directory to find it idea.bat Or the idea64.exe file, and then directly double-click to start. The first start welcome interface is shown as follows:
In the process of rendering the first interface, the bottom layer of idea is actually initializing. If it is the first time to start, you will enter the second interface after a while, for example:
In the second interface, we first select create new project, and then enter the create project interface. Here, we first select create empty project, as shown in the figure
After selecting the empty project, click next to enter the design of the project, as shown in the figure:
In the figure above, click Finish to complete the creation of the project and enter the project work window of idea, as shown in the figure below:
Basic configuration of idea
Appearance theme configuration
Scroll wheel to change the font size configuration, as shown in the figure:
Package import configuration, as shown in the figure:
Line number and method separator configuration, as shown in the figure:
Code prompt configuration, as shown in the figure:
Code completion configuration, as shown in the figure:
The font configuration in the code editing area is shown in the figure
Console font configuration, as shown in the figure:
The annotation color configuration in the code is shown in the figure
File encoding configuration
Build execution configuration
Compiler (compiler configuration)
Automatic compilation configuration (optional). If it is selected, it may be slow, as shown in the figure:
Maven configuration in build tools
Maven initialization configuration (if there are already configured ones, you can use them)
Find the conf directory under the Maven root directory on your disk, and open the settings.xml File, and then configure as follows:
- Configure the Maven local library (where the resources downloaded from the Maven remote server are stored)
- Configure Maven private service (configure to the inside of mirrors tag).
<mirror> <id>aliyun</id> <name>aliyun for maven</name> <mirrorOf>*</mirrorOf> <url>https://maven.aliyun.com/repository/public</url> </mirror>
- Configure the profile in Maven (in the profiles tab), and set the JDK compile and run version.
<profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8 </maven.compiler.compilerVersion> </properties> </profile>
Integrating Maven configuration in idea
Find the build tools / Maven option and integrate the local Maven configuration in idea. As shown in the figure:
This section mainly gives a brief introduction to idea development tools, and then makes a preliminary configuration based on our subsequent applications. Based on this configuration, we can better carry out project creation and testing.