Getting started with eclipse (3)

Source: Internet
Author: User
Tags jboss
Download and install the application server JBoss

In order to develop the server, an application server is also required and the application server is integrated with Eclipse. Eclipse can work with multiple application servers, including WebLogic, WebSphere, JRun, Orion/Oracle9iAS, JBoss, JOnAS, and Resin. The following uses the popular open-source application server JBoss as an example. First download and install JBoss, I use JBoss 3.0.3, installed in D:/jboss-3.0.3 directory. To integrate JBoss with Eclipse, you also need to download the relevant plug-ins. The download location is. There is also an installation guide at http://www.genuitec.com/products/eclipse_jboss..pdf. Exit Eclipse, decompress the downloaded file to D:/eclipse, and restart Eclipse.

The newly installed plug-in must be activated before it can be used. Select WINDOW> Custom perspective, and select the EASIE JBoss option in "others.

Configure the plug-in, select Window> preferences, and enter information about the JBoss plug-in.

After the preceding two steps are completed, the start and stop JBoss button appears in the toolbar. Click Start to start JBoss.

Open the debugging perspective, and you will see information about the JBoss process just started in the debugging perspective.

You can use the stop button next to the start button to stop JBoss. There are also WebLogic ins supporting WebLogic, WebSphere, Orion/Oracle 9iAS on this website. The installation methods are basically the same.

Eclipse debugging

Up to now, all the configurations required to build a complete development environment have been completed. Next we will go back to the Hello World project to see what the debugging program needs to do.

Those who have used IDE are very familiar with breakpoint, single-step running, and other concepts. Eclipse has all the debugging functions that IDE should have. The debugging procedure is as follows:

1. First, set a breakpoint in the program. Double-click the gray area on the left of the statement to add a breakpoint to the statement;

2. Click the debug button (a Bug) in the toolbar );

3. Select HelloWorld under the Java application;

4. Click "debug". The program runs at the breakpoint you just set and stops running;

5. Press F6 and execute in one step. At this time, the program runs to the next statement;

6. Press F8 to continue running until the program ends.

Import the JUnit sample program

Next we will import a real project, which is from the Eclipse JDT example.

1. Select File → import;

2. Select "ZIP file ";

3. Browse and find the location of the source code Jar file, and enter JUnit in the folder;

4. Click "finish" to import a new JUnit project.

The development process of this project is not detailed here. For detailed development process, see Java Development User Guide in help.

Like other popular Java ides, you can also get content help in Eclipse. The hot key for getting content help is Alt + /.

The Eclipse SDK has integrated Ant and JUnit tools for building and testing projects, as well as powerful mechanisms to support code refactoring (refactoring ). These contents are described in detail in the Java Development user guide. After reading this Eclipse getting started article, you can directly read the Java Development user guide. By studying the Java Development user guide, we can feel that Eclipse is a new generation of IDE that we need to support XP (eXtreme Programming) fast development methods.

The Eclipse log file is stored in the workspace/. metadata/. log file. This file is used to save runtime errors. The information in this file is useful in error removal.

This article introduces the Java Development Process in Eclipse. You may also be interested in using Eclipse to develop other languages. Eclipse Platform is a common tool Platform. It does not know any specific language, but opens a door so that the plug-in can support various languages. The Eclipse SDK includes a full-featured Java IDE. This is an example of how to scale the platform to support a special language. The SDK also provides Java file editor plug-ins and XML file editor plug-ins.

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.