< Previous | Next >

Lesson 1: Using the SampleUtil application to validate that your system meets the requirements for the pureQuery runtime engine

Before you run the generated code, you can confirm that you are using a level of the IBM® Data Server Driver for JDBC and SQLJ that the pureQuery runtime engine supports. You can also confirm that you are using a supported level of a Java™ Runtime Environment.

Optim™ Development Studio comes with two pureQuery components:

In the previous lesson, you used the pureQuery tooling to generate code. To run the code against the GSDB database, you use the pureQuery runtime engine. To use this engine, you need to fulfill requirements that are separate from those that you need to use the tooling.

You can confirm that you meet these requirements by running the SampleUtil application that the pureQuery tooling generated in the previous lesson.

Tip: You meet the requirements for the pureQuery runtime engine if you meet the following criteria:
  • You used the default JRE when you created a Java project
  • You specified the default location for the pureQuery .jar files when you added pureQuery support to the project
  • You connected to a data source with the IBM Data Server Driver for JDBC and SQLJ that comes with Optim Development Studio
Therefore, if you followed the steps in this tutorial, you already meet these requirements. However, you might not always use these default values. In such situations, the SampleUtil application will be useful.

To confirm that your system meets the requirements for the pureQuery runtime engine:

  1. Locate the SampleUtil.java file. In the Project Explorer, expand the pureQuery_test project: pureQuery_test > src > pureQuery.example > SampleUtil.java.
  2. Right-click the SampleUtil.java file and select Run As > Java Application.
    Figure 1. Right-clicking the SampleUtil.java file to get to the Java Application option
    Right-clicking the SampleUtil.java file to get to the Java Application option
    The Console view opens with the output from the SampleUtil application. The output contains a good deal of information about how pureQuery is currently configured and about your system. However, to find out whether your system meets the software requirements for running the pureQuery runtime engine, scroll to the bottom of the output. You should see lines like these:
    pureQuery Software Prerequisites satisfied.  Found in classpath:
    IBM Data Server Driver for JDBC and SQLJ at release 3.57.82
    Prerequisite level is 3.57 or higher.
    Java Runtime Environment version 1.6.0
    Prerequisite JRE versions: { 1.5 1.6 }
You validated that your system meets the requirements for the pureQuery runtime engine.
< Previous | Next >

Feedback