As mentioned earlier, the engineering Extension class library has 3 sources, namely, sharing other engineering libraries, JBuilder class libraries, and specifying. jar or. zip class library packages. Select Required Libraries tab on the right side of the Project Properties dialog box by Project->project properties->paths, through Add ... Buttons can be added to the project's extended class library in three of these ways. It is similar to the addition of an engineering class library and the JBuilder class library by specifying. jar or. zip class libraries, so this is only a tutorial on how to add the JBuilder class library to the Engineering class library.
Here is also an example to illustrate the steps, open the JTJB2005/CHAPTER3/USINGLIB/USINGLIB.JPX project under D disk, add the Hibernate JBuilder Class library added in the previous section to the project. Pull up the Project Properties dialog box, as shown in Figure 3-32.
Click the add ... on the right of the Project Properties dialog box. The button pops up the Add to Project classpath dialog box as shown in Figure 3-33.
Select the Libraries tab, select the Hibernate class library under the JBuilder node in the list box, and click the OK button to return to the previous dialog box, where the Libraries class library entry is listed in the list box on the required Hibernate label page. Click the OK button to complete.
After adding the hibernate to the engineering Extension class library, In the USINGLIB.JPX engineering program, we refer to classes in the class library, double-click Usinglib.TestHibernate.java in the Engineering panel, and add a statement in line 2nd referencing the class in the Hibernate class Library: Import Net.sf.hibernate.Session the cursor over the session by pressing the F1 key, as shown in Figure 3-34.
Figure 3-32 Maintenance Engineering Extension Class Library dialog box
Figure 3-33 Selecting an engineering extension class library
JBuilder will pop up the Help Viewer window and display the Javadoc assistance documentation for this class. If the help document for the class library is not set up correctly, assist Viewer will be just a blank page, and you need to call the documentation setting of the Hibernate class library in the JBuilder class library.