WebSphere Studio Application Developer Version 5 Programming Guide part 14

WebSphere Studio Application Developer part 14 provides integrated development tools for all e-business development roles, including Web developers, Java developers, business analysts, architects, and enterprise programmers. The customizable, targeted, role-based approach of WebSphere Studio Application Developer will be characteristic of all new products built on the WebSphere Studio Workbench. It is well integrated with WebSphere Application Server and provides built-in server test environments that can be used for testing and profiling Web applications | Executing the CustomerListing class should result in an error. The Console view will display the following error message Customer Listing for CUSTOMER Exception ver Exception null The exception information indicates that there was a problem locating a class required to run the program. To correct the error you have to add the JAR file with the DB2 JDBC driver code to the classpath. Adding a JAR file to the classpath We have to update the Java build path that was previously defined. Select the ItsoProGuideJava project and Properties from the context menu. Then you select the Java Build Path entry and the Libraries tab Figure 5-12 . Figure 5-12 Java Build Path settings for the ItsoProGuideJava project There are two ways you can specify access to the required classes Select Add External JARs and locate the file in the file system. Select Add Variable to add a variable that refers to the file. It is recommended to use the second option because you are not directly referencing a physical path that could be different for another developer within a team. 104 WebSphere Studio Application Developer Version 5 Programming Guide For this sample it is assumed that a variable DB2JAVA has been defined. If DB2 is installed on your system Application Developer predefines this variable. To add this variable to the Java build path for the project select Add Variable to display the New Variable Classpath Entry dialog Figure 5-13 . Figure 5-13 Adding a variable to the classpath Select the DB2JAVA variable and close the dialog with OK. If the DB2JAVA variable is not available in the dialog you have to create a new variable. Click the New button to display the New Variable Entry dialog Figure 5-14 . Enter DB2JAVA in the name field and select the file from the file system by clicking the File button and confirm the dialog with OK. Figure 5-14 New Variable Entry dialog The sample code can now be executed again and the list of

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
2    77    1    14-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.