Product Documentation

c-treeDB API for Java

Previous Topic

Next Topic

Compile Using NetBeans IDE

You can use the NetBeans IDE to compile and run the provided tutorials. You can find these in the drivers\java.nav\tutorials\IDEProjects\NetBeans directory. Each subdirectory under that path contains a project for its respective tutorial.

The NetBeans Environment

To build these samples, follow these steps:

  1. Use the Open Project dialog (Control+Shift+O) in NetBeans to browse to that location and open one or more tutorials.
  2. To build these samples, select the desired project from the Projects group window and use F11 (or Run > Build Project).
  3. To fully observe how these tutorials interact with FairCom DB, set a breakpoint (Ctrl+F8) in an area of the code that you are interested in and use Debug Project (Ctrl+F5) to step through the program.

    If you move these projects to a different directory, bear in mind that the project uses relative paths to access the ctreeJTDB.jar and JNI library files. So those files must move with your project, or the paths in the project must be updated to the proper locations.

By default, the output will look similar to the following:

INIT

Logon to server...

DEFINE

Open table...

Add fields...

Create table...

MANAGE

Delete records...

Add records...

Display records...

1000 Bryan Williams

1001 Michael Jordan

1002 Joshua Brown

1003 Keyon Dooling

DONE

Close table...

Logout...

Press <ENTER> key to exit . . .

To fully observe how these tutorials interact with c-tree, set a breakpoint (Ctrl+F8) in an area of the code that you are interested in, and use Debug Project (Ctrl+F5) to step through the program.

If you move these projects to a different directory, bear in mind that the project uses relative paths to access the ctreeJTDB.jar and JNI library files. So those files must move with your project, or the paths in the project must be updated to the proper locations.

Troubleshooting the manual execution / run:

ERROR: [133] - c-tree logon error.

The most common cause of this run-time error is the FairCom Database Engine is not running on your machine. The most likely cause is that the c-tree evaluation license times out after 3 hours and shuts down the server. The solution is to restart the server. See the Starting the FairCom Database Engine.

TOCIndex