Build a development environment using eclipse

Source: Internet
Author: User

If you are used to myeclipse, there may be many areas that you are not used to when using the dedicated eclipse-jee version. The configuration may be quite different.
Eclipse-jee-Galileo + atat6.x Development Environment setup

Prerequisites:
Tools: JDK, tomcat, and eclipse
Recommended use: jdk1.6.0 _ 20, APACHE-Tomcat-6.0.26, eclipse-jee-galileo-SR2-win32 (own download)
JDK virtual machine configuration
Java_home: C:/program files/Java/jdk1.6.0 _ 20 // installation path
Path:.; % java_home %/bin;
Classpath:.; % java_home %/lib/dt. jar; % java_home %/lib/tools. jar;

 

Tomcat_home: D:/Apache-Tomcat-6.0.26;
Path:; % tomcat_home %/bin
Classpath: % tomcat_home %/common/lib/servlet-api.jar;
// Class loading path and Path
(Classpath:.; % java_home %/lib/dt. jar; % java_home %/lib/tools. jar;.; % atat_home %/common/lib/servlet-api.jar;
Path:.; % java_home %/bin;.; % tomcat_home %/bin ;)
After the configuration is complete, test javadoc in cmd to view the Java command and continue.

"Taking my app project as an example"
1. working directory
D:/workspace/cooltrans
2. tools:
D:/Apache-Tomcat-6.0.26 and eclipse-jee-galileo-SR2-win32 (downloaded by yourself)
Start eclipse
Windows --> preferences --> JAVA --> installed jres --> Add standardvm
(JDK Directory: Find the installed JDK directory in JRE home, for example:

JRE home: C:/program files/Java/jdk1.6.0 _ 20
JRE name: jdk1.6.0.20 <keep auto-generated by default>
Default VM arguments:-dbizessential ce_home = D:/workspace/cooltrans/APP
)
(Pointing to the current project directory, you can find the XXX. config configuration file under the config directory under the app directory. Of course, this is based on how your actual project is initialized)
Point to the working path normally (D:/workspace/cooltrans). If you don't know why, sometimes an error occurs and direct it to the actual project directory to solve the problem.
Indicates that the Tomcat STARTUP configuration file exists under the SRC same-level directory in your web project directory.

Bizessence. conf exists in the config file.) Note:-D indicates the parameter and must be capitalized.

3. In the blank area of the taskbar, right-click showin --> Web --> servers (Display Server options)

4. In the server bar, right-click "servers" and choose "New --" server (new server) -- "select what you need. Here I select Apache --" Tomcat v6.0 server -- next ". The dialog box is displayed.
Name column: You can customize the name of the new server to keep the default value.
Tomcat install directory bar: Find the Tomcat path. My path is D:/Apache-Tomcat-6.0.26.
JRE column: select the JDK name just set in eclipse. Here is jdk1.6.0 _ 20.
Click Finish.

5. In the servers column, you will see the server you just created. Note that the server is still started incorrectly.
Double-click the newly created Tomcat server in the displayed dialog box.
Server locations Column
Select 2nd items: Use tomcat installation (takes control of Tomcat installation)
Press Ctrl + to save.
Now, restart eclipse to create a project test.
Create a dynamic web project
Select web2.5
Select the Tomcat you configured. You can name the project webroot by yourself. It doesn't matter.
After startup, You can see hello, world! In index. jsp! Okay.

6. If
Xxx... did not find a matching property error occurs when Tomcat is started in eclipse.
Solution:
(1) In the servers console, right-click the server node and choose Properties
(2) Click Switch location on the General tab. The value of location is updated to/servers/tomcat6.0 server at localhost. server.
(3) On the servers console, double-click the server node to find the Tomcat project -- Tomcat v6.0 server at localhost. server, and double-click it to open it.
(4) Check publis module context to separate XML files in the bottom server option, and CTRL ^ s to save.

7. Note: it is best to configure the Tomcat server first, create a web project, add a lib class library, and then import the project.
Avoid errors caused by loading servlet, JSP, and SDK class libraries. I have encountered this problem many times when setting up the environment.

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.