Eclipse Installation and Configuration

Source: Internet
Author: User
Tags apache tomcat

Eclipse's website address: http://www.eclipse.org/
We download the Java version: Eclipse IDE for Java EE developers
Currently the latest version is: Eclipse Kepler (4.3)
1. Eclipse IDE for Java EE developers:
64-bit: https://pan.baidu.com/s/1boGfhFp

2, Eclipse installation:
This version is the uncompressed version, For example, the path of our extracted eclipse is: F:/eclipse-jee-helios-sr2-win32/eclipse (hereinafter referred to as%eclipse_home%)
If we configure the JDK environment variable, after entering%eclipse_home%, double-click" Eclipse.exe ", you can start ECLIPSE, you will be prompted Select a workspace .
Here we recommend that you create more workspace, and you can create different project in different workspace according to your actual needs. To prevent future projects in workspace from becoming more and more, it affects the startup speed of Eclipse (of course, it is closed for projects that are not in use recently – right-click the project name and select "Close Project", if you need to open the project, Right-click the closed project name to select Open Project. )。
Toggle workspace can be selected at startup, and can be toggled in "File" – "Switch Workapsce" after startup.

3. Configuration of Eclipse:
After starting eclipse for the first time, we need to do some basic configuration, usually we need to do the following configuration:
1) Configure the JDK by default, Eclipse automatically associates the JDK configured in the environment variable, and if we install multiple versions of the JDK, it can be configured manually, as follows: "Window" – "Preferences" – "Java" – "Installed JREs "–" Add "–" Standard VM "– Select the JDK installation directory.


2) Configure Tomcat "Window" – "Preferences" – "Server" – "Runtime Environments" – "Add" – "Apache" – "Apache Tomcat v7.0" – Select the directory of TOMCAT7 , the JDK configured in the JRE Select 1).

The configuration is complete and can be verified in the Servers view. The default Servers view is turned on below the Java EE preset view, and if it is not, you can open the Servers view with Window – Show view – Server – Select Servers.
In the Servers view, right-click – "New" – "Server" – select "Tomcat v7.0 Server" and if you see "Apache Tomcat v7.0" in "Server Runtime Environment", Indicates that the configuration was successful.


3) Start speed up Eclipse startup will load some plug-ins by default, and loading these plugins will increase eclipse startup time, in fact, some things are not very important to us, so you can close the method as follows: "Window" – "Preferences" – " General "– Startup and Shutdown – Remove the plugins you don't want.


4) Turn off verify that the default eclipse validates the items in workspace, validates the contents of the JSP, the XML content, and so on, and the validation process consumes memory, so it is recommended to turn off the authentication feature. The closing method is as follows: "Window" – "Preferences" – "Validation" – "Disable all".


5) Set the new menu item Eclipse default new content does not meet the requirements, many things also need to go to other to find, but we can customize the new menu item content, as follows: Right-click on the toolbar – "Customize prespective ..." – " Shortcuts "– Select the new item you want.


6) Default file editor eclipse automatically selects the editor of the file by default, or you can right-click on the file when opening the file – "Open with" to select the editor, but sometimes we might prefer to have the file use a specific editor, which can be configured as follows: "Window" – "Preferences" – "General" – "Editors" – "File Associations", select a specific filename suffix type above, select the editor below, you can add by adding, and set the default editor through the defaults.


7) Annotation Style definitions We all know the importance of annotations, and in the team, it is more important to unify the annotation style. Here's how to set the annotation style: "Window" – "Preferences" – "Java" – "Code Style" – "Code Templates" – Set it yourself, for example comments
Types: The code is as follows

/**   * Title:project_name   * description:xxxx *    copyright:copyright (c)  * Company:www.xxx.com   * makedate:${date} ${time}  * @author ${user}    * @version%I%,%g%   * @since 1.0   *  

  

 

8) eclipse modifies the encoding format, on the menu navigation bar window–>preferences Open the Preferences dialog box, the left navigation tree, navigate to General–> Workspace. Windows 7 platform defaults to GBK, the default encoding for the Simplified Chinese operating system Windows XP, Windows 2000 Simplified Chinese is that the Gb18030,linux platform defaults to UTF-8
So the engineering code built in this workspace is GBK, and the Java file created in the project is also GBK.

Click Apply and click OK.


9) Modify the encoding of the file. Right-click on the Eclipse project file, select Properties, and in resource Select Modify encoding format
10) Sometimes we need some kind of file such as:. JSP,. Java, etc.
Navigation bar Window–>preferences
Open the Preferences dialog box, left navigation tree, navigate to Genera–>content Types
On the right, find the type of file you want to modify, and I'll take *.java for example.
In the default encoding below, enter Utf-8->update->ok in the input box
The encoding format of the new JSP file in Eclipse. Windows Preferences Web JSP files changes the value of the right encoding to ISO 10646/unicode (UTF-8) and then applies. OK, then the content of the new JSP file is UTF-8 encoded.

Eclipse Installation and Configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.