Pervasive PSQL v9 Java Class Library (JCL) - May 2006

This document contains the following topics:


About Java Class Library

Java Class Library (JCL) is a set of classes that allow access to Btrieve data.

System Requirements

Note: The JCL SDK is currently not supported on the Linux platform.

Getting Started

The Java Class Library (JCL) release includes binaries, samples, and documentation that enable you to develop Java-based applications that connect to Pervasive PSQL v9 database engines.

For more information about JCL, see the JCL section of the Pervasive Developer Center at http://www.pervasive.com/developerzone/access_methods/jcl.asp

Installation

To install Java Class Library:

  1. Unpack the zip file to a directory of your choosing. For example, create a directory called SDK under your Pervasive PSQL installation (c:\pvsw\sdk\)
  2. Copy psql.jar and jnibtrv.dll to the BIN directory of Pervasive PSQL. For example, assuming you installed the database engine to C:\pvsw, copy the file to C:\pvsw\bin.

New in Pervasive PSQL v9 Java Class Library Release

This release of JCL supports database security and connection using URIs that were introduced with the Pervasive.SQL V8 (8.5) release. The connection methods have been updated to support URIs. Any applications that used the previous version of JCL must be updated in order to use the Pervasive PSQL v9 Java Class Library. You can also specify the character encoding used by the Database and Table classes.

Note: The pmke: and pids: protocols are no longer supported. You cannot use this version of JCL with the I*net Data Server.

To make a connection to the database using the btrv protocol supported by Java Class Library:

  Session session = Driver.establishSession();
  Database db = session.connectToDatabase("btrv://user@host/dbname?pwd=password");

At a minimum, you should specify the database name. For example:

  Database db = session.connectToDatabase("btrv:///demodata");

You can also specify URI parameters. For more information on database URIs, see Pervasive PSQL Programmer's Guide.

This table contains a list of some key changes to classes in the Pervasive PSQL v9 Java Class Library. For a complete reference of Java Class Library, see the Java Class Library Reference.

Class/Method

Description

Javadoc Reference

Session.ConnectToDatabase() method

Now used to connect to Pervasive PSQL databases using URIs.

javadoc

Database.setCharEncoding() method

Used to specify the character encoding for the Database object.

javadoc

Table.setCharEncoding() method

Used to specify the character encoding for the Table object.

javadoc

DBURI class

Class representing a database URI object.

javadoc

DBUtil class

Class with convenience methods for handling URIs.

javadoc

Components List

These are the components that comprise the Java Class Library.

Component

Description

PSQL.JAR

Java Class Library JAR - redistributable. Ensure this is in the CLASSPATH for your application.

JNIBTRV.DLL

Java Native Interface for Btrieve. Place in the BIN directory of the engine. For example, C:\pvsw\bin

Documentation for Java Class Library

The following documentation for the Java Class Library is provided:

Samples for Java Class Library

The following samples for the Java Class Library are provided:

Known Issues in this Release

The following are known issues with this release.

Issue Number Description
n/a n/a

Useful Links

Discuss all your Pervasive development issues at DevTalk at http://www.pervasive.com/devtalk.

See some creative applications and code snippets and share your own at Pervasive ComponentZone at http://www.pervasive.com/componentzone.

Disclaimer

PERVASIVE SOFTWARE INC. LICENSES THE SOFTWARE AND DOCUMENTATION PRODUCT TO YOU OR YOUR COMPANY SOLELY ON AN "AS IS" BASIS AND SOLELY IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THE ACCOMPANYING LICENSE AGREEMENT.
PERVASIVE SOFTWARE INC. MAKES NO OTHER WARRANTIES WHATSOEVER, EITHER EXPRESS OR IMPLIED, REGARDING THE SOFTWARE OR THE CONTENT OF THE DOCUMENTATION; PERVASIVE SOFTWARE INC. HEREBY EXPRESSLY STATES AND YOU OR YOUR COMPANY ACKNOWLEDGES THAT PERVASIVE SOFTWARE INC. DOES NOT MAKE ANY WARRANTIES, INCLUDING, FOR EXAMPLE, WITH RESPECT TO MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE OR ARISING FROM COURSE OF DEALING OR USAGE OF TRADE, AMONG OTHERS.

Copyright 1999-2006 Pervasive Software Inc. All Rights Reserved.