< Previous | Next >

Lesson 1: Creating a Java project

When you develop applications with pureQuery in IBM® Data 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 IBM Data Studio.

To create a Java project:

  1. Start IBM Data Studio.

    After you start IBM Data Studio, by default you are in the SQL and Routine Development perspective.

  2. Create a connection to the GSDB database.
    1. In the Data Source Explorer, right-click the Database Connections folder and select New.
    2. 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.
  3. Switch to the Java perspective. Click Task Navigator > Java Database Application Development.

    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
    The Package Explorer and the Hierarchy tabs
  4. If the Task Launcher view is open, close it.
  5. Create a Java project:
    1. Right-click in the Package Explorer and select New > Java Project. The New Java Project wizard opens.
    2. Type pureQuery_test in the Project name field at the top of the wizard. Leave the rest of the options at their default values.
    3. Click Finish.

    IBM Data 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
  6. 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.
< Previous | Next >

Feedback