NO.A.0009——day04——idea installation and configuration tutorial

Overview:
Integrated Development Environment: IDE, development tools Integrated Development Environment, IDE,

1、如果自己手洗衣服:
    1. 准备一盆水
    2. 放入衣服浸泡30分钟
    3. 搓洗衣服
    4. 倒掉水,换一盆水
    5. 漂洗衣服
    6. 倒掉水
    7. 拧干衣服
    8. 晾晒
2、如果使用全自动洗衣机:
    1. 放入衣服,打开开关
    2. 拿出衣服,晾晒
3、回顾一下开发Java程序的步骤:
    1. 编写代码
    2. 启动cmd
    3. 调用javac编译
    4. 调用java运行
4、集成开发环境,是一种专门用来提高Java开发效率的软件。
    免费的IDE当中:Eclipse
    收费的IDE当中:IntelliJ IDEA

1. IDEA installation tutorial:
1. IDEA official download tutorial:
IDEA official website download address: https://www.jetbrains.com/idea/download/#section=windows
IDEA official website: https://www.jetbrains.com/
official website ——>See All Tols——>intelliJ IDEA (Download)——>Ultimate (Ultimate Edition) Download——>
Insert picture description here

Choose the intellij IDEA we need to download (download)
Insert picture description hereInsert picture description here

Download: Ultimate (Ultimate Edition) Download (Although it is charged, it can be used for free evaluation)
Insert picture description here

2.
Double-click the IDEA installation process to open —> select the installation address (disk D) —> select the (64-bit-launcher) desktop shortcut —> name: keep the default — click show datalls to see the installation details — —Finish (installation completed)
Insert picture description hereInsert picture description here

2. IDEA first startup level: When creating a project and
using IDEA for the first time, pay attention to its level -> whether to import some settings (Do not) -> whether to customize some themes (Darcula)-X will pop up again after dropping Create the project window.
Insert picture description here
Insert picture description here

Do you need to import some settings
Insert picture description here

Whether to customize some themes

Insert picture description here

2. Create a new project:
create New Project——>empty Project (name, custom location) —> pop up the project Scttings program window —> project creation is complete.
Insert picture description here

Select: empty Project (empty project)
Prompt:
This project already exists, click yes; if there is no prompt that the project exists, also click yes, it will be created automatically.

Insert picture description here

Welcome tip: remove the tick before show tips on startup and click close. If you don’t remove it, it will pop up next time.

Insert picture description here

3. Create a module: pop up a Project Structure folder: modules——>modules; a folder one level lower than project;
modules——>click the + sign on the left——>choose: New Module—— >The default is Java on the left, and No SDK on the right (select the home directory of Java) ——>next——>modules name (Chinese is not recommended) ——>finish——>modules are created.

Insert picture description here

Give the module a name -> click Finish to complete.
Insert picture description here

Note: src: All source code is written inside the src directory, written outside the src folder, and written outside is not the source code.
out: The directory stores the compiled .class files.
Dea: The directory and demo.iml have nothing to do with our development and are used by the IDEA tool itself.
day04-code.iml: The configuration information related to idea has little to do with our operations.
External Libraries: External libraries. After clicking on it, it is found to be jdk. We generally don't use it, but Module does.

4. Package: Create a package,
right-click src——>Select New——>Select Package——>Name the
Package ——>OK Package name requirements: English lowercase, number, English period, common name: use company domain name Reverse the
note: A package is the name of a group of folders;

5. Create a .java program class file: (Develop a HelloWorld program under this structure)
select the Package name -> select New -> select Java Class (create a new Java class) -> name the class file as (HelloWorld )——>Enter: HelloWorld class file will be generated under Package——>Class creation is complete.
Insert picture description here

Class files will be automatically generated
Insert picture description here

6. Write a main method: and execute it;

Insert picture description here
Insert picture description here

Note: The program executed by java is HelloWorld.java which cannot be run. It runs the HelloWorld.class file: put the source file .class under the out directory of the source code folder.

3. The basic configuration of IDEA: adjust the font size, adjust the shortcut key (recommended setting)
font: File——>settings(Stril+Alt+S)——>Editor——>font (font)——>size( Size)——>OK
Auto-complete shortcut key: File——>settings(Stril+Alt+S)——>Keymap——>Default copy——>Enter (the original setting, I will copy the setting for you)
Smart prompt shortcut: File——>settings(Stril+Alt+S)——>Keymap——>main menu——>code——>cmpletion——>Basic——>Double click (Remove Ctrl+space)——> Add Keyboard Short (Alt+forward slash) (prompt that other influencing functions also have shortcut keys, directly OK)

1. Commonly used shortcut keys:
hot key Features
Alt + Enter Import the package, automatically modify the code
Ctrl+Y Delete the line where the cursor is
Ctrl+D Copy the content of the line where the cursor is, and insert it below the cursor position
Ctrl+Alt+L Format code
Ctrl+/ Single line comment
Ctrl+Shift+/ Select code comment, multi-line comment, and press to cancel comment
Alt+Insert Automatic code generation, toString, get, set and other methods
Alt+Insert Automatic code generation, toString, get, set and other methods
Alt+Shift+ Up and down arrows move the current line of code

2. IDEA import and close the project:
close the existing project in IDEA:
close the Project: File (——>Close Project (return to IDEA just started interface)——>click the X on the project, IDEA just hides IDEA The project source code is still in the original location.
Open the historical project in IDEA:
Open Project: File——>Close Project (return to IDEA just started interface)——>Open——>Project local folder——>Select OK— —> The historical project will be reopened.
3. IDEA hides a Module and imports a Module:
Delete Module: Select the module email——>remove module——>remove——>OK
Import Module: File——>Project Settings——> Modules——>click the + sign——>import module——>select the module that needs to be imported——>OK——>Create module from existing sources——>nest——>Reuse——>At this moment, the module is successfully imported in IDEA ;

Guess you like

Origin blog.51cto.com/15005403/2552553