Eclipse IDE for Java EE Developers Development Environment Building detailed graphics (EE)

Source: Internet
Author: User
Tags java decompiler apache tomcat

Using eclipse really years, I believe that the Java programmer did not know it, recently in the team of new fresh students to do guidance, specifically to explain the eclipse development environment of the building process, one is to help them as soon as possible familiar with the use of the IDE, The second is to ensure the consistency of the team development environment (by the way, this is particularly important in agile development teams, facilitating knowledge dissemination and improving team responsiveness).

During the course of training, I think of the situation when I was involved in Java at the beginning of the year, inevitably filled with emotion. The so-called "工欲善其事 its prerequisite", words not much to say, hurry up.



One. JDK Installation and configuration

Jdk7 was just released in March and the latest version of Eclipse has not yet provided support for JDK7, so we only download jdk6. : http://download.java.net/jdk6/Select the appropriate installation file for the platform, windows32 the latest version is: jdk-6u25-ea-bin-b03-windows-i586-27_feb_2011. EXE is installed by default, configure environment variables when the installation is complete. For example, my installation directory is: C:Program FilesJavajdk1.6. The environment variable is configured as follows: Under XP system, right click on "My Computer"--Select "Properties"--select "Advanced"--click "Environment variable" in "System variable (S)" NEW: Java_home:c:program FilesJavajdk1.6 NEW: Class_ PATH:.; %java_home%lib After creating the environment variable, open cmd and enter "Java-version" to verify that the installation was successful.


Copy Code

The code is as follows:
C:windowssystem32>java-version
Java Version "1.6.0_13"
Java (TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot (TM) Client VM (build 11.3-b02, mixed mode, sharing) two. Tomcat Installation and configuration Tomcat official website: http://tomcat.apache.org/The latest version of 7.0,WINDOWS32 is currently the latest version:/http Labs.renren.com/apache-mirror/tomcat/tomcat-7/v7.0.11/bin/apache-tomcat-7.0.11-windows-x86.zip This is the uncompressed version, after downloading, unzip can, Tomcat is required for the JDK to run, and if we configure the JDK environment variable, Tomcat will automatically read the JDK information from the environment variable without special configuration. For example, we will extract the Tomcat directory as: f:apache-tomcat-7.0.11-windows-x86apache-tomcat-7.0.11 (hereinafter referred to as%tomcat_home%) into the%tomcat_home%/ Bin, double-click "Startup.bat" to start Tomcat, if Tomcat starts normally, we access "http://localhost:8080/" to open the Tomcat administration page. You can turn tomcat off by double-clicking "Shutdown.bat". Manage account configuration: Because it is a development environment, here we configure a super user

Copy Code

The code is as follows:







By restarting Tomcat, you can then manage tomcat using the admin account, which only shows how to configure the account, how to use the interface to manage Tomcat for a while, and refer to the Tomcat Help documentation, mainly because it is almost impossible to use in the development environment. And I recommend manual configuration.

Three. Eclipse Install and configure Eclipse's official website address: http://www.eclipse.org/
We download the Java version: Eclipse IDE for Java EE developers
Currently the latest version is: Helios Service Release 2
WINDOWS32 version of: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/helios/SR2/ Eclipse-jee-helios-sr2-win32.zip

This version is an uncompressed version.
For example, the path of our extracted eclipse is: F:eclipse-jee-helios-sr2-win32eclipse (hereinafter referred to as%eclipse_home%)

If we configure the JDK environment variable, after entering%eclipse_home%, double-click "Eclipse.exe" to launch ECLIPSE, you will be prompted to select a workspace on startup.

It is recommended that you create a few more workspace, you can create different project in different workspace according to the actual needs, so as to avoid the more and more project in Workspace in the future, which will affect the startup speed of Eclipse (of course, For projects that you don't use recently, close it--right-click the project name, select Close Project, and if you need to open the project, right-click the closed project name and select Open Project. )。

Toggle Workspace can be selected at startup, and can be toggled in "File"--"switch Workapsce" after startup.
You can also refer to "http://hanqunfeng.iteye.com/blog/868197" for Eclipse's management of workspace.

After starting eclipse for the first time, we need to do some basic configuration, usually we need to do the following configuration:

1) Configuring the JDK
By default, Eclipse automatically associates the JDK configured in the environment variable, and if we have multiple versions of the JDK installed, 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 Tomcat7 directory, In the JRE, select 1) to configure the JDK.

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", if you see "Apache Tomcat v7.0" in "Server Runtime Environment", Indicates that the configuration was successful.

3) Start speed up
When Eclipse starts, some plugins are loaded by default, and loading these add-ons increases the eclipse startup time, and in fact some things are useless to us, so you can close them as follows:
"Window"--"Preferences"-"General"-"Startup and Shutdown"-Remove the plugins you don't want.
4) Turn off validation
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 validation 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, a lot of content also needs to go to other to find, but we can customize the new menu item content, the method is as follows:
Right-click the toolbar--"Customize prespective ..."--"shortcuts"--Select the new item you want.






7) Annotation style definition
I believe everyone knows 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 as needed
Like comments.
Types:

Copy Code

The code is as follows:
/**
*title:project_name
*description:xxxx
*copyright:copyright (c) 2011
*company:www.xxx.com
*makedate:${date} ${time}
* @author ${user}
* @version%I%,%g%
* @since 1.0
*
*/methods:/**
* Description: < describes function implementation function;.

*


                                                                                                                                                                                                                
* ${tags}
*/You can automatically add comments via "alt+shift+j".
Four. Eclipse Common Plug-in installation The reason that eclipse is so popular is that it has a large number of plugins to support, and here are just a few common plug-ins. 1) The SVN plugin may have some people who prefer "Little turtle", but it is recommended to install the SVN Eclipse plugin. Official address: Http://subclipse.tigris.org Currently the latest version is 1.6.17Eclipse update site url:http://subclipse.tigris.org/update_1.6.x
Zipped downloads:http://subclipse.tigris.org/servlets/projectdocumentlist?folderid=2240
The plugin installation method is as follows: "Help"--"Install new software"--"add" name:svn_subclipselocation:http://subclipse.tigris.org/update_1.6. x click "OK", as shown here: Only "Subclipse" is selected here, next as shown. Click "Next" and click Finish to start the installation. You will be prompted to restart Eclipse when the installation is complete. After you restart Eclipse, you can open the SVN repository view by selecting "SVN repository" in "Window"-"Show View"-"Other"-"SVN". Right-click in the View--"new"--"repository Location"--Enter the address--finish. 2) Propedit plug-in official address: http://propedit.sourceforge.jp/index_ En.html in the development, often use multi-lingual support problems, the common solution is to put each language text in the properties file, but the Chinese need to be ASCII, although there are some tools to help us to transcode, but are not as easy to write in the propeities in Chinese, then install plug-in it , this plugin basically can support the conversion of various languages. Here's how: "Help"--"Install new software"--"add" name:propeditlocation:http://propedit.sourceforge.jp/eclipse/updates/ When you click "OK", Eclipse will automatically search, depending on the network situation, the time will be different,usually takes 2-3 minutes, will appear the following page: Here only select "Propertieseditor", eight quit cinema next after needTo be patient for a period of time, about 5-10 minutes later will see the following interface, after clicking Next, see the following interface: Select "Accept" and then click "Finish", Eclipse will start to install the plug-in, the installation process of about 10 minutes, wait patiently. You will be prompted to restart Eclipse when the installation is complete. If you feel that the URL update is too long to download the plugin, you can also download the ZIP package for local installation. Zip Package:http://zh.sourceforge.jp/projects/propedit/downloads/40156/jp.gr.java_conf.ussiy.app.propedit_5.3.3.zip/ 3) Anti-compile pluginJad is a Java anti-compilation tool, but a command line execution. Eclipse has a plug-in, called Jadclipse, after installation, in the Java file by Ctrl + The left mouse button class name (including the jar package), you can directly open the source file. Install jadclipse to download a jad.exe first, unfortunately did not find the official address of the JAD, I have provided in the Annex A, can support jdk1.5 and 1.6 of the anti-compilation. Jad.exe to be copied to the%java_home%/bin directory. Jadclipse is currently the latest version: 3.3.0
jadclipse:http://sourceforge.net/projects/jadclipse/copies the downloaded jar to the Plguin of Eclipse.
Restart Eclipse, after reboot in Window>preferences>java>jadclipse,
Set path to Decompiler for the full path of Jad.exe, both:%java_home%/bin/jad.exe Online search data, there is said directly double-click ". class file" can also open source files, unfortunately has not been successful. There are also n many useful plugins that provide several: Findbugs-http://findbugs.cs.umd.edu/eclipse/mylyn for Eclipse 3.4 and 3.5-http:// Download.eclipse.org/tools/mylyn/update/e3.4/python-http://pydev.org/updates/jsdt-http://jsdt.googlecode.com/svn/trunk/org.ayound.js.debug.update/a JS debug plug-in ,www.rcsx.org support the current mainstream browser, if using a cross-browser JS framework such as jquery to develop, it is recommended that you use the Firefox firebug bar. Wait, find it yourself. updates via URL updates or zip packages are sometimes lengthy and can be copied directly from the ZIP package features and plugins to%eclipse_home%, restarting ECLIPSE to complete the installation. OK, after the above configuration, a relatively easy-to-use eclipse development environment is even built. You can also make other configurations according to your needs. Or the old saying: "工欲善其事 its prerequisite", The eternal truth!2011-04-02 Supplement:Thank you for your reply, many people recommend the "Easyexplorer" plug-in, here is given: http://sourceforge.net/projects/easystruts/Configuration reference: In addition, you can install the plugin through links, This is not only fast installation, but also upgrades, porting, management is very convenient. For the configuration of the links mode, refer to: http://java.chinaitlab.com/Eclipse/37794.htmlIn addition, the author test found that the use of multiple plug-ins with the same link file configuration will occur when the plug-in can not be loaded, so I suggest, or a plugin to use a link file it.
2011-04-03 Supplement:Another anti-compile plugin,--java Decompiler, is recommended for two ways of GUI and plugin. GUI Way is still very good, can be batch decompile and save, can be added as a plugin.

Eclipse IDE for Java EE Developers Development Environment Building detailed graphics (EE)

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.