Making Java Client Programs Connect to a Rules Engine
To be able to connect to a Rules Engine, the computer on which the Java client programs run needs a set of JDBC driver Java classes. This is the only additional software requirement on the client computer; no other USoft software is required on the client computer. The USoft JDBC driver classes are delivered within the <USoft installation>/java/JDBCClasses.jar Java archive file.
As an alternative, the USoft driver classes are also available in a JDBCClasses.zip archive file. This serves Java virtual machines that do not support the Java archive format.
To make these classes available within Java, the Java virtual machine needs a reference to this jar file in its classpath. For example, to start a Java client program with the USoft classes in its classpath, you have to type in a command prompt window:
java classpath C:\<usoft installation>\java\JDBCClasses.jar YourJdbcClient
To use the USoft Rules Engine in a Java program, four steps are needed within the Java program:
The Java code fragments in the following sections can be compiled by a Java compiler and show the contents of a PERSON table that has been defined in a USoft repository.
To use JDBC classes in a Java program, include this import statement in the Java source file: