The Eclipse Java EE Development Environment Eclipse is an open source, powerful IDE development environment, plus his extension functionality, 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. In order to be able to test, you need to install a Web server, I use Tomcat below describes the installation and configuration (Win32 platform). 1. JDK installation, note settings for environment variables, 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. 4. Eclipse's general configuration. 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, the following figure Compier configuration, the following figure, according to the JDK selection, I use the jdk1.50, so the selected 5.0 &NB Sp General setup is complete, the following is a separate introduction to 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 &NBSp The settings here are only part of the server configuration and you need to add a server project to your project so that you can apply it in other projects before you can deploy the application properly. The following figure: Haha, so far, myeclipse installation configuration has been completed. The following is Lomboz, and he also needs a few steps back. 5. Install the Lomboz plug-in, this is free, and follow Eclipse's plug-in installation rules, direct decompression, copy to plugin or features directory 6.lomboz configuration, this configuration is also simple, in windows-preference will be more A server option that is also configured for Web server. The following figure: again, you need to add a server project to do so. Ok, the installation and configuration of the Lomboz is complete. Installation and configuration completed, these are not complicated, but the use of the process, you will certainly encounter many 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 use 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. After Next, the dialog shown in the following figure appears to be required, project name, source folder, Web root folder, context root URL where Web root folder is the one you want to publish Web folder, which contains your JSP file, the directory of the library files. The context root URL is your URL directory, such as you write/dl, then you should use HTTP;//LOCALHOST;8-80/DL to visit Click Finishe to complete the new process. Notice that the compiled class file is placed inside the Web root folder to dois because your application needs them. In addition, the directory structure of Web root folder conforms to the Weib application format, that is, directories such as Web-inf, Meta-inf, Web-inf/lib, web-inf/classes. I put the compiled class file into the web-inf/classes directory, the external needs of the library, such as struts, JDBC database driver, I put the Web-inf/lib directory Well, write your program, the following is how to deploy Your Web application. Click on the icon, pop-up the following dialog box to 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, following figure Next, you need to fill in the source file directory, the context root, content directory, the context root is the URL you want to write when you visit the directory, content Directory is your Web application's catalog. Project is new, don't forget to design your web directory and put the class file in your Web directory. Below is deployment, right click on Tomcat server, select "Add and Remove Projects", the following figure: The item to be published, click "Publish" on the release. There is a difference between the release of Lomboz and MyEclipse, MyEclipse will be deployed directly to the WebApps directory of Tomcat, while Lomboz is only published within the project. In the release process, you do not have to choose which folders to publish, he will be your new project when the Web directory, so be sure to design your web directory, all the required files to include. Finally 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. MostA good idea 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 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.