Eclipse Getting Started (3)

xiaoxiao2021-03-06  59

Download, install application server JBoss

In order to do server-side development, you still need an application server and integrate the application server with Eclipse. Eclipse can work together with a variety of application servers, including WebLogic, WebSphere, Jrun, Orion / Oracle9ias, JBoss, Jonas, Resin, etc. The following is exemplified by the current popular open source application server JBoss. The first thing I want to download and install JBoss, I am using JBoss 3.0.3, installed in the D: /JBoss-3.0.3 directory. In order to integrate JBoss with Eclipse, you also need to download related plugins, download location is http://www.genuitec.com/products_easie.htm, http://www.genuitec.com/products/easiejboss1.0.6.zip. There is also a installation guide in http://www.genuitec.com/products/eclipse_jboss.pdf. Exit Eclipse, unzip the file just downloaded under D: / Eclipse, restart Eclipse.

The newly installed plugin needs to be activated to use, select window → custom perspective, select the EASIE JBOSS item in "Other".

Then configure this plugin, select Window → Preferences, and enter information about JBOSS plug-ins.

After the above is performed, the button that starts and stops JBoss will appear in the toolbar. Click the start button to start JBoss.

Open the debugging view, you will see the JBoss process related to the initiated JBoss process in the debug perspective.

Stop JBoss can use the stop button next to the start button. On this website, there is also a plugin for WebLogic, WebSphere, Orion / Oracle 9ias, and the installation method is basically exactly the same.

Eclipse debugging

So far, the configuration required to establish a complete development environment is basically completed. Let's go back to the Hello World project, look at what you need to do.

Those who have used IDE are very familiar with the concept of breakpoints, single-step operation, and Eclipse has debugging features that all IDEs should have. The debugging steps are as follows:

1. First set a breakpoint in the program, double-click the gray area on the left of the statement, then a breakpoint is added to the statement;

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

3. Select HelloWorld under the Java application;

4. Click "Debug" and the program will run to the breakpoints you just set, and then stop running;

5. Press F6, single step, this time the program runs to the next statement;

6. Press F8 to continue to run to the end of the program.

Import JUnit Example

Below we import a real project, this project comes from an example of Eclipse JDT.

1. Select file → import;

2. Select "ZIP file";

3. Browse and find the location where the source code JAR file is located, enter junit in the folder;

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

Limited to the space, this project's development process is not described in detail. For specific development processes, please see the "Java Development User Guide" in the help.

Like other popular Java IDEs, you can also get content help in Eclipse, and the hotkeys that get content help are Alt /.

Ant and Junit tools have been integrated in the Eclipse SDK, and there is a powerful mechanism to support code reconstruction. These content have more detailed introductions in the Java Development User Guide. After reading this Eclipse's entry article, you can directly see the "Java Development User Guide". Through the study of "Java Development User Guide", you can feel that Eclipse is a new generation of IDE we need to support XP (extreme programming) rapid development method. Eclipse's log file is saved in the Workspace / .Metadata / .log file, this file is used to save the runtime error, which is very useful when the error is in the wrong.

Introduced the development process of Java in Eclipse, you might be interested in developing other languages ​​using Eclipse. Eclipse Platform is a universal tool platform. It doesn't know any specific language, but opens a door so that the plugin can support a variety of languages. Eclipse SDK includes a full-featured Java IDE. This is an example of how to extend the platform to support a special language. The SDK also provides an editor plugin for the Java file and an editor plugin for the XML file.

转载请注明原文地址:https://www.9cbs.com/read-112632.html

New Post(0)