Java programming those things 14-Eclipse basic use of advanced Author: Chen yuefeng from: http://blog.csdn.net/mailbomb
2.2.4 advanced eclipse basic usageAfter familiar with the basic use of Eclipse, I will add other common eclipse operations below, mainly including the following skills: L classification project directory l open the project l add jdkl add source code l shortcut speed Query
2.2.4.1 category project directoryIn the default Eclipse project directory, both the source code and class files are stored in the project root directory, which is messy. You can set the structure of the project directory by setting the following settings: menu "window"> "Preferences…"> "Java"> "build path", select the "Folders" option on the right, set "source folder name" to SRC, and "Output Folder name" to classes, select "OK" to complete the settings. In this way, when creating an Eclipse project, the SRC and classes folders will be automatically created under the project directory, and the newly created source code files will be stored in the src directory under the project directory by default, by default, the generated class files are stored in the classes directory under the project directory.
2.2.4.2 open a projectIn daily use, you often need to open an existing project. To open an existing Eclipse project in eclipse, follow these steps: choose "file"> "import"> "general"> "existing projects into workspace" and click "Next" to open the import window, select "Browse…" next to "select root directory ..." Click to select the root directory of the project. The project name is now in the blank area under the Import window. Select the "finish" button to open the project.
2.2.4.3 add JDKBy default, only one JDK is integrated in eclipse. If JDK of different versions is required during project creation, you must first integrate the corresponding JDK in eclipse, then you can select when creating a project. To add a new JDK to eclipse, follow these steps: menu "window"> "Preferences…"> "Java"> "installed jres", select the "add" button on the right, and select "Browse…" after "JRE home directory" in the pop-up window ..." Click the button to select the root directory of the JDK installation directory to be added, for example, C:/j2sdk1.4.2 _ 11. Select "OK" to add the JDK.
2.2.4.4 add source codeAdd the existing Java source code to an existing project to run the program in eclipse. Step 1: copy the file, instead of the content of this file 2. Select the source code directory of the corresponding project in the project list on the left side of the eclipse interface, for example, src directory under the hello project 3. Press Ctrl + V to paste it.
2.2.4.5 quick query of shortcutsTo facilitate operations on Eclipse, eclipse provides common shortcut keys and lists. You can choose "help"> "Key assist" to view them.
2.3 conclusionThe configuration and use of the development environment is described in a simple way. In fact, only understanding these aspects can not meet the actual development requirements, and a large amount of learning is required in use, be familiar with the use of these tools and software.