Disclaimer: The materials used in this column are written by VIP students of Kaige Academy. Students have the right to remain anonymous and have the right to final interpretation of the article. Kaige Academy aims to promote VIP students to learn from each other based on public notes.
1.Windows Eclipse (in three steps): ①Download
the eclipse package; ②Unzip the eclipse package;
③Open
eclipse.exe, you must configure the JDK.
Download address: http://www.eclipse.org/downloads/eclipse-packages/
After downloading, unzip the compressed package directly into the folder, then open and run eclipse.exe (the JDK environment variables must be configured, at least PATH)
2. Centos Eclipse: ①Download
address: http://www.eclipse.org/downloads/eclipse-packages/;
②Download the Eclipse compressed package; ③Unzip
the Eclipse compressed package, and then open the eclipse program inside;
④Before opening, be sure to configure the environment variables of JDK, otherwise eclipse cannot be opened;
3. Java development tools in the industry:
①Jbuilder ②Jcreator
③NetBeans ④IDEA
⑤Eclipse supports JavaEE development; IBM
download address: http://www.eclipse. org ;
⑥MyEclipse: A plug-in based on the Eclipse development tool, supporting the development of JavaEE
4. Eclipse usage: ①Open
eclipse.exe; ②Remind
you to set or select a working folder, as shown in the figure:
Why work clips? Because the projects and operation files created in the future are in this folder, and the configured tool setting information is in this directory; as shown in the figure:
③ Don't ask questions next time, and directly enter the selected workspace, as shown in the figure:
④You can manually set a clip as a future work area, as shown in the figure:
⑤ Restart the development tool (restart).
5. You can adjust the skin window >> properties of the Eclipse software:
①Open the properties (all eclipse configuration information is in this menu), as shown in the figure:
②Set the skin effect of the window, as shown in the figure:
6. You can modify the code font:
① Modify the code font, as shown in the figure:
②The selected basic font, all code blocks will change, as shown in the figure:
7.Eclipse defaults to automatic compilation: ①Automatic
compilation option, as shown in the figure:
②As long as you save the code, it will be compiled automatically, as shown in the figure:
If you remove the tick, it becomes a manual compilation. After you write it yourself, you have to click build to compile it; you can use
Clear the compiled class files.
8. Default workspace settings, as shown in the figure:
9. Create a project in Eclipse
① Before we do development, the steps are as follows:
A. Create a file;
B. Then write the code;
C. Compile and run.
②The benefits of creating a project:
1) Independent environment configuration;
2) Code partition storage.
③Project creation: Java Project
1) Ordinary java project, as shown in the figure:
2) Plug-in project, as shown in the figure:
3) You can name the project by yourself, as shown in the figure:
4) The storage path of the project is in the workspace by default, if you want to put it in another path, as shown in the figure:
5) You can choose a path yourself, as shown in the figure:
This is the JDK selection, that is, your project operating environment;
6) If you want to configure a JDK yourself, follow the configuration below, as shown in the figure:
④You can configure JDK yourself
1) Click on the configuration:
Or click on properties:
2) Add JDK: Click Add
3) Select the path of JDK:
You can also rename it.
10. The java project structure created by Eclipse, as shown in the figure:
①Click on the project properties:
②Select the path of the project:
11. Create a Class file:
①Choose to create a Class file:
②Source code path (generally not selected by default):
③This is the package selection (no need to manage now, just clear it):
④Fill in the class name:
⑤ Choose whether to generate a main method for you:
⑥If there is no source package, create one yourself. A project can have many source packages:
12. Simple shortcut keys:
①alt+/ self-completion;
②ctrl+1 prompt modification;
③ctrl+/ comment.
13. How to run the class (you must have the correct main method to run it first):
①Click the run button to run:
②Right-click in the blank area of the class code:
③ Press F11 on the keyboard.
14. Window:
①In the project window, one by one is the project:
②Error summary window, all error messages are displayed here:
③Introduction to document annotations:
④Console window (all the data printed are displayed in the console, this control cannot display a lot of information, it will be washed out):
⑤Task:
⑥Structure introduction:
⑦Add window: If you accidentally close it, you can add it from the inside
. There are many windows to add:
There are more windows click on the options below:
⑧The window can be dragged and dropped freely: reset reset
15. Errors:
① The code syntax is wrong, and the correction cannot be prompted;
② The code syntax is wrong, and the prompt can help you correct it, but it is not necessarily the one you want;
③ Warning: This variable has been applied for and not used.
16. Import and export projects:
①The copying process is very simple, just copy directly to the project;
②Import the project:
③Select your project path:
④ Checking this option means to copy the project to your workspace: