This document contains the following topics:
Java Class Library (JCL) is a set of classes that allow access to Btrieve data.
Note: The JCL SDK is currently not supported on the Linux platform.
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
To install Java Class Library:
c:\pvsw\sdk\)
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.
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 |
|---|---|---|
|
|
Now used to connect to Pervasive PSQL databases using URIs. |
|
|
|
Used to specify the character encoding for the Database object. |
|
|
|
Used to specify the character encoding for the Table object. |
|
|
|
Class representing a database URI object. |
|
|
|
Class with convenience methods for handling URIs. |
These are the components that comprise the Java Class Library.
|
Component |
Description |
|---|---|
|
PSQL.JAR |
Java Class Library JAR - redistributable. Ensure this is in the |
|
JNIBTRV.DLL |
Java Native Interface for Btrieve. Place in the BIN directory of the engine. For example, |
The following documentation for the Java Class Library is provided:
The following samples for the Java Class Library are provided:
helloworld - simple sample demonstrating connection to the
DEMODATA database provided with Pervasive PSQL. You can pass a URI parameter
if security is enabled on your machine.
join - demonstrates SQL joins
serialization - demonstrates how to serialize Java objects.
pvideo - this sample simulates the management of a video store. A separate Pvideo database is provided if you
wish to run this sample.
The following are known issues with this release.
| Issue Number | Description |
|---|---|
| n/a | n/a |
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.
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.