When you develop applications with pureQuery in Optim™ Development Studio, you work
with Java™ projects in the Java perspective. To get started,
you need to create a Java project
so that you can use it for your exploration of pureQuery.
Java projects are
not specific to pureQuery. You need to use a Java project for any type of Java application that you develop in Optim Development Studio.
To create a Java project:
- Start Optim Development
Studio.
After you start Optim Development
Studio, by default you are in the SQL and Routine Development perspective.
- Create a connection to the GSDB database.
- In the Data Source Explorer, right-click the Database
Connections folder and select New.
- Follow the steps in the wizard to create a connection
to your instance of the GSDB database. For the database
manager, select DB2 for Linux, UNIX, and Windows.
For the JDBC driver, select IBM Data Server Driver for
JDBC and SQLJ (JDBC 4.0) Default.
- Switch to the Java perspective. Click .
The Java perspective opens. The Java perspective has fewer views at the bottom
than the Data perspective has, and the Data Source Explorer is
not shown. You might expect the Data Source Explorer to
remain open because you plan to use pureQuery to access a database.
However, you will open the Data Source Explorer and
several helpful views in the next lesson.
Notice the two tabs
in the top left part of the Java perspective:
the Package Explorer and the Hierarchy tabs:
Figure 1. The Package Explorer and the Hierarchy tabs
- If the Task Launcher view is open,
close it.
- Create a Java project:
- Right-click in the Package Explorer and
select . The New Java Project
wizard opens.
- Type pureQuery_test in the Project
name field at the top of the wizard. Leave the rest of
the options at their default values.
- Click Finish.
Optim Development
Studio creates this Java project.
You can see the pureQuery_test project in the Package Explorer.
Figure 2. The pureQuery_test Java project
in the Package Explorer
- Close the Task Launcher view. Click the X on
the Task Launcher tab. Click OK to close the
dialog box.
You now have a Java project
that you can use for your exploration of pureQuery.