Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Hubert Klein Ikkink (aka Mr.Haki) - Communications Officer
 Mr.Haki's JBuilder Jar #41
See Also: JBuilder Papers

Adding new Java APIs
Busy people are working at Sun MicroSystems. Every week we can download a new Java API from 3D APIs to JavaHelp. It is hard to keep up, but is also hard to include these new APIs in JBuilder.

The best way to include these APIs in JBuilder is by turning them into JBuilder libraries. These libraries can be included and excluded from our projects as we wish. A library contains a reference to actual API code, like a JAR file. We can tell the library where to look for documentation on the API. And we can include a path to sources of the API in our library. So how do we make such a library?

Steps for creating a new library:

  1. Go to Tools on the main menu and select Default Project Properties….
  2. Select the Libraries… button on the shown dialog.
  3. This will open a new dialog:
    Screenshot of libraries dialog
    Here we see the libraries already available and options for adding a new one.
  4. Select the New button so we can add a new library. For this example we will be creating a library for the Java Shared Data Toolkit (JSDT) API from Sun. This API contains classes for creating distributed application with sharing of data, like network whiteboards.
  5. The right of the dialog shows input fields in which we must fill in values for the API:
    Screenshot of dialog for new library
  6. In the Name: field we fill in the name of the API as we want it to appear in the library list of JBuilder. In our case Java Shared Data Toolkit.
  7. Next we fill in the class path of the API. The JSDT consists of a single JAR file. We can fill in the full path to the JAR file or browse to it by clicking on the ... button next to the input field. In my case it is placed in C:\Apps\JSDT-1.5\lib\jsdt.jar.
  8. Next we must fill in the path to source code of the API. The JSDT doesn't come with source code, so we leave it empty in our example. But if we should have source code we can assign the path to the source code here.
  9. And finally we can include a path the API documentation files. For the JSDT we can find the documentation in the docs\jsdtapi folder in the JSDT main folder. So the value is C:\Apps\JSDT-1.5\docs\jsdtapi The documentation will not show up in the JBuilder Help, but is accessible from the Doc tab page when we browsed into a class file from JSDT.
  10. JBuilder checks all paths when we click on the OK button and the library is available in the lists of libraries.

When we create a project and we want to use this library we simply add it to the project libraries via the Project Properties... dialog.


This webpage © 1997-2009 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.