Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
22 Chapter 2 Choose Your Development Environment Figure 2.8 Create a sample application. Figure 2.9 List of sample applications Download from www.wowebook.com Eclipse 23 As before, this list is retrieved from the remote WebSphere sMash repository, so you’ll need an Internet connection to populate this list to. After you select a sample, click Next and then Finish, and the sample application will be created in your current workspace. After it has been created, you can poke around and take a look at the sample, edit it, and run it as is discussed later in this chapter. Creating a New Project Creating a new project in Eclipse will be familiar to those who. | 22 Chapter 2 Choose Your Development Environment Figure 2.8 Create a sample application. Figure 2.9 List of sample applications Download from www.wowebook.com Eclipse 23 As before this list is retrieved from the remote WebSphere sMash repository so you ll need an Internet connection to populate this list to. After you select a sample click Next and then Finish and the sample application will be created in your current workspace. After it has been created you can poke around and take a look at the sample edit it and run it as is discussed later in this chapter. Creating a New Project Creating a new project in Eclipse will be familiar to those who have used Eclipse before. Go to File New Project and choose a WebSphere sMash application then click the Next button see Figure 2.10 . Figure 2.10 New Project dialog box Next you ll be prompted to type in a project name and you ll have the option to select a location for the project. When you have completed those tasks press the Finish button. You ll now have a newly created project in your workspace ready to edit or run. If you browse through the project structure you ll find many project-related files to browse or edit. To run the application right-click on the project and select Run As WebSphere sMash Application as shown in Figure 2.11. When the project is started the Eclipse console window displays messages to indicate that the application was started and on which port the application is listening. Download from www.wowebook.com 24 Chapter 2 Choose Your Development Environment Run As 1 Java Applet Alt Shift X A Debug As E 2 Java Application Alt Shift X J Profile As Validate Add Remove Lisp Nature Q 3 WebSphere sMash Application Run Configurations. . Figure 2.11 Running the application inside Eclipse Adding Dependencies To add dependencies you need to double-click the ivy.xml file inside the project. To do this expand the project and then expand the config directory as shown in Figure 2.12. - J zero.messaging.appl.demo