Create the JCICS example projects to understand how to
develop Java™ applications that
can run in CICS®.
Procedure
- In the Eclipse IDE, open the Java perspective.
- Set the target platform to the latest release
of CICS to work with the JCICS examples.
Otherwise, compilation
errors can occur when you create the examples in your workspace.
- Click from the workbench
menu bar.
- Expand Plug-in Development and
click Target Platform.
- Click Add to create a target
definition.
-
Click Template and select CICS TS V5.4 from the
list.
- Click Next in the wizard and
then click Finish.
- Select the target definition and click OK.
- To create an example plug-in project, use one of the following
methods to open the New Example wizard:
- In the Eclipse menu bar, click .
- Click the down arrow on the New icon
and click Example.
- In the Project Explorer or Package Explorer view, right-click
and click .
- In the folder, select one of the
following examples, then click Next:
- CICS Bundle JDBC Example. This example
demonstrates how to connect to DB2 using the JDBC DriverManager interface.
- CICS Bundle OSGi Example. This example
demonstrates how to create a CICS bundle
to deploy to CICS.
- Click Finish.
Eclipse
creates the plug-in project that contains the example.
Tip: If
the project does not build and the following error occurs, ensure
that you completed step
2 successfully:
Bundle 'com.ibm.cics.server' cannot be resolved
- Expand the project in the Package Explorer view.
- The Plug-in Dependencies folder contains
the dependencies for the OSGi bundle. This information is also captured
in the manifest of the project.
- The src folder contains the Java source for the examples. You can browse
the source files to see the JCICS classes that are used and use the
context help to look up a specific class. You can also open the Javadoc view to see the API details
for the selected content, for example a method or class.
- The META-INF folder contains the manifest
for the project. The manifest contains the OSGi headers to describe
the OSGi bundle.
- Create plug-in projects for other examples by using the
New Example wizard.
You can view the Java source to understand how the JCICS classes
are used for working with programs.
Results
You created plug-in projects in Eclipse for the JCICS examples.
These projects contain OSGi bundle packaging information, including
plug-in dependencies and target Java environments.