Illustration of the building process of Eclipse Java EE Development Environment _java

Source: Internet
Author: User
Tags tomcat server

Eclipse is an open source, powerful IDE development environment, plus his extended plug-in capabilities, making it widely available.
Java EE has several development environments, Eclipse+lomboz or eclipse+myeclipse.
MyEclipse is a commercial product that is more powerful than the Lomboz feature, especially in MVC development such as struts.
To be able to test, you need to install a Web server, I'm using tomcat

The installation and configuration (Win32 platform) are described below.
1.JDK installation, pay attention to the setting of environment variable, Java_home,classpath,path
2.tomcat installation, attention to environment variable settings, Tomcat_home,catalina_home
3.eclipse3.2 installation, because it is Java developed, unpack to a directory can be.
General configuration for 4.eclipse. Even if you do not add plug-ins such as MyEclipse, Eclipse needs to be configured. Need to configure the main, JDK directory, the following figure:

Build path configuration, as shown in the following figure

Compier configuration, as shown below, according to the JDK selection, I used the jdk1.50, so the selected 5.0



The general settings are complete, and the following is a separate description of MyEclipse and Lomoz.
5. Installation MyEclipse, installation is very simple, after installation fill out the registration code
6. MyEclipse configuration, in the windows-preference will come out with a myeclipse option, you need to configure only the Application Server section, the following figure


The settings here are only part of the server configuration and you need to add a server project to the project so that you can apply it in other projects before you can deploy the application properly. The following figure:


At this point, the MyEclipse installation configuration is complete.
The following is Lomboz, and he also needs a few steps back.
5. Install the Lomboz plugin, this is free, and follow Eclipse's plug-in installation rules, extract directly, copy to plugin or features directory
6.lomboz configuration, this configuration is also simple, in the windows-preference will be more than one server option, but also configure the Web server. The following figure:

Also, you need to add a server project to do so.

The installation and configuration of the Ok,lomboz is also complete.


Installation and configuration completed, these are not complicated, but the use of the process, you will certainly encounter a lot of problems, such as the library can not find the application deployment is not successful, if the above process, configuration is not wrong, these problems and your project settings have a relationship.
Create a new project and copy a project to come over is not the same operation, if not pay attention, they will also give you face.
Note that your project type, different types will appear different options, for example, a JSP project to deploy to the Web server, then must be a Web project, otherwise, the application deployment options do not appear.

I'll take a new Web project as an example to illustrate how to create a new project and publish it.
The first is in the MyEclipse.
Create a new Web project, which is under the Other-myeclipse-j2ee branch, as shown below.


Next, a dialog box appears as shown in the following illustration
Required to complete, project Name,source folder,web root folder,context root URL
Where Web root folder is the Web folders you want to publish, that is, the directory that contains your JSP files, the library files.
The context root URL is your URL directory, such as you write/dl, then you will use HTTP;//LOCALHOST;8-80/DL to access


Click Finishe to complete the new process.
Note that the compiled class files are placed in the Web root folder because your application needs them. In addition, the directory structure of WEB root folder conforms to the Weib application format, that is, a directory like web-inf,meta-inf,web-inf/lib,web-inf/classes. I put the compiled class file into the web-inf/classes directory, external libraries, such as the STRUTS,JDBC database driver, I put in the Web-inf/lib directory


Well, write your program, and here's how to deploy your Web application.
Click on the icon, pop-up the following dialog box

Select the items to publish, select Add, will let you choose to publish to the server, I use TOMCAT5, all like the picture on the same.
Note that, as mentioned earlier, if you are not a Web project that can be published, the deployment action cannot be performed, and a dialog box pops up that does not have a deployable project.

MyEclipse finished, the following look at the Lomboz, there are some differences between them.
Create a new Dynamic Web project, fill in the project name and Web server, as shown below

After next, you need to fill in the source file directory, Context root,content directory
The context root is the URL directory you want to write when you visit,
Content directory is the directory for your Web application.

When the project is new, don't forget to design your web directory and put the class file in your Web directory.

Here's the deployment, right click on the Tomcat server and select "Add and Remove Projects", as shown in the following figure:

Select the item to be published and click "Publish" to publish it.
Lomboz and MyEclipse are different, myeclipse are deployed directly to the WebApps directory of Tomcat, and Lomboz is only published within the project.

In the release process, you don't have to choose which folders to publish, he will be the Web directory when you create a new project, so be sure to design your web directory, all the required files to include.
Finally, let's talk about the project import. Because of the differences in the environment, the project is not directly available, often the compiler will not be able to publish the issue, and so on, Lomboz and myeclipse between the guide will have problems. The best way to do this is to create a new Web project that is consistent with the items you want to import, and then copy the files back to the directory instead of the full copy.

The above is the Eclipse Java EE Development Environment construction process, hope to be helpful to everybody's study.

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.