Get Started with KingswaySoft JDBC Driver Pack

Overview

The KingswaySoft JDBC Driver Pack is a collection of lightweight JDBC drivers that connect to various proprietary APIs, making it feel just like working with a traditional database using SQL commands. This guide will walk you through installation, licensing, setting up connections, and executing SQL commands.

Prerequisites

Before using the driver, ensure you have the following prerequisites:

  • JDK 1.8 or later
  • The kingswaysoft.jdbc.jar library, which is included in the downloaded package
  • A valid license (a 30-day free trial starts automatically on first use).

Installation

  • Download the driver pack and unzip it.
  • Find the kingswaysoft.jdbc.jar file in the extracted folder.
  • Add it to your project’s classpath or library directory. After you have downloaded the driver pack, extract the .zip file in order to obtain the following library to be used in your project.
  • kingswaysoft.jdbc.jar : A pure Java Type 4/5 JDBC Driver, compiled with JDK 1.8, designed to enable seamless JDBC connectivity.

Connecting via DriverManager

To connect using the DriverManager class, follow standard JDBC conventions with the KingswaySoft JDBC Driver Pack. Begin by loading the driver class first, and then proceed to establish the connection.

Step 1: Load the Driver (Optional for JDBC 4.0+)

This step is optional as modern JDBC drivers auto-register. Only include this if using legacy environments:

Class.forName("com.kingswaysoft.jdbc.Drivers");
Step 2: Establish a Connection

Use the DriverManager.getConnection method with a connection string starting with "jdbc:kingswaysoft:". Replace “API Name” with the specific API you want to connect to.

Connection connection = DriverManager.getConnection("jdbc:kingswaysoft:ServiceName=API Name;", null);

You can configure connection options by creating a Properties object and setting the desired properties before passing the object to the DriverManager.

Properties connectionProps = new Properties();
connectionProps.put("UserName", "username");
connectionProps.put("Password", "password");
connectionProps.put("Domain", "domain");

Connection connection = DriverManager.getConnection("jdbc:kingswaysoft:ServiceName=API Name;", connectionProps);

Check the Connection Settings section in each driver’s help page for more options.

Connecting via DataSource

For connection pooling or JNDI integration, use JdbcDriverPackDataSource class as the alternative option.

JdbcDriverPackDataSource ds = new JdbcDriverPackDataSource
    ("jdbc:kingswaysoft:ServiceName=API Name;...", connectionProps);

Connection connection = ds.getConnection();