Use eclipse to build a J2EE development environment

Source: Internet
Author: User

1. Download and install eclipse
Download Eclipse IDE for Java EE developers at http://www.eclipse.org/

Ii. Download and install struts
1. Download struts2.1.8.1from http://struts.apache.org.
2, according to the need to gradually copy the JAR file in the./lib/directory to the WEB-INF/lib path

3. Download and install Maven
Eclipse has built-in ant, so you only need to install maven. m2eclipse is a plug-in for eclipse. You can download it at http://m2eclipse.sonatype.org/and restart eclipse after installing the install new software function of eclipse. a warning dialog box is displayed, prompting: the Maven integration requires that eclipse be running in a JDK, because a number of Maven core plugins are using jar from the JDK. follow the prompts to modify the following two places:
1. Add the following parameters to eclipse. ini. Note that the parameter must be placed before the-vmargs parameter.
-VM
D:/program files/Java/jdk1.6.0 _ 20/bin/javaw.exe
2. Change installed jres to JDK

* Note: When a proxy server is used on the network, MAVEN will report: Unable to update index for central | http://repo1.maven.org/maven2. The final solution is to copy a settings.xmlto c:/documents and settings/username /. m2 directory, and modify settings. XML file (because m2eclipse does not have settings by default. XML file, so the next Maven is required to obtain settings. XML) to add an HTTP proxy.

4. Download and install jquery
Download jqueryat http://jquery.com/. the latest version of jquerycore is 1.4.2. There is only one JS file.
Jquery has two core types: minified and regular ). The scale-out version is achieved by compressing the regular version. It does not reduce the number of features, but reduces the number of blank lines, spaces, comments, and other things, which can greatly reduce the transmission volume in actual deployment; the general version is generally used for debugging and reading.
Some jquery plug-ins that may be used in the project:
1, the official form plug-in: http://jquery.com/plugins/project/form, the file is jquery. Form. js

5. install and configure sitemesh
1. struts2.1 contains the sitemesh plug-in: struts2-sitemesh-plugin-2.1.8.1jar. Copy it to WEB-INF/lib path.
2. Copy sitemesh-2.4.2.jar to the WEB-INF/lib path
3. Add the sitemesh filter to Web. xml.
4. Add the decorators configuration file in the WEB-INF/lib path: decorators. xml and define the decorator used

Vi. install and configure spring
1. struts2.1 contains spring plug-in: struts2-spring-plugin-2.1.8.1jar. Copy it to WEB-INF/lib path.
2. Copy the spring-beans-2.5.6.jar, spring-context-2.5.6.jar, spring-core-2.5.6.jar, spring-web-2.5.6.jar to the WEB-INF/lib path
3, struts2.1 does not contain spring ORM related package, to Use ORM also need to download a full version of spring 2.5.6 on the spring website, and then will spring-aop.jar, spring-orm.jar, spring-tx.jar, spring-jdbc.jar, aopalliance. copy jar to WEB-INF/lib path

VII. install and configure hibernate
1. Download hibernate3from http://sourceforge.net/projects/hibernate.
2. decompress and copy the JAR file in the hibernate3.jar and./lib/required/directory to the WEB-INF/lib path.
3. If the project is using JPA, you also need to copy./lib/JPA/hibernate-jpa-2.0-api-1.0.0.Final.jar to the WEB-INF/lib path
4, The runtime will report the lack of a class slf4j, but this class hibernate3 package download is not provided, need to download a slf4j-nop-1.5.2.jar to copy to the WEB-INF/lib path
5. Download different JDBC drivers for your own databases. MS sqlserver download Microsoft SQL Server JDBC Driver 3.0

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.