Developer’s Guide

Table Of Contents
Using Java and JDBC to deliver your data 9-11
Example 2: Creating the JBuilder
Inventory application
This example demonstrates how to build a Java front end to a FileMaker
database using the development tool, JBuilder 3.0 Professional for
Windows and the FileMaker JDBC Driver. This example uses a
modified version of the Asset Management.fp5 database that ships with
FileMaker Pro. The following steps are for creating a Java application
that accesses the database, renamed Inventory.fp5.
Install the example and FileMaker JDBC Driver
If necessary, install the JBuilder folder of example files and the
FileMaker JDBC Driver.
The JBuilder 3.0 Professional example folder contains the database
file used in this example and all of the completed files generated by
the JBuilder wizard for the application.
Set up JBuilder to use the FileMaker JDBC Driver
1. In a text editor (such as Notepad), open the Jbuilder.ini file from
the bin folder inside the JBuilder 3.0 Professional application folder.
(Please make a backup copy of this file before proceeding with these
instructions.)
2. In the [Java_VM_Properties] section, add the path of the
Fmpjdbc12.jar file to the end of the Djava.class.path line.
For instructions on installing the FileMaker JDBC driver into the
JBuilder environment, see “Installing and setting up JBuilder for
database applications” in the online JBuilder Help or go to
www.borland.com/devsupport/jbuilder/.
Open and share the Inventory.fp5 database
1. In FileMaker Pro, open the Inventory.fp5 file in the JBuilder 3.0
Professional folder.
2. Choose File menu > Sharing, verify that Web Companion is selected,
and click OK to share the database on the Web.
For information about setting up the Web Companion so that it’s
already selected in this dialog box, see “Enabling the Web
Companion” on page 6-3.
Start a new JBuilder project
1. Start JBuilder 3.0 Professional for Windows.
2. In JBuilder, choose File menu > New Project.
3. In the dialog box, specify the name and location for the project file
(JBuilder Inventory).
4. Choose Project menu > Properties.
5. Click Libraries in the Properties dialog box.
6. In the Available Java Libraries dialog box, select the Fmpjdbc12.jar
file. (If the FileMaker JDBC Driver does not appear in this dialog
box, click New to locate the file and add it to the list.) Then click OK.