You create your CICS® Java™ application as an Eclipse plug-in
project that complies with the OSGi specification. The OSGi Service
Platform provides a mechanism for developing applications by using
a component model and deploying those applications into a framework
as OSGi bundles.
The plug-in project is an OSGi bundle,
and contains all the files and artifacts needed for the CICS Java application,
including the JCICS class library to access CICS resources and interact with programs that
are written in other languages. The completed application is then
added to a CICS bundle project
before being exported to the host system.
About this task
This task creates a new plug-in project. You can leave
the settings on their default values unless otherwise stated. When
the project is created you must edit the manifest and add the JCICS
API dependencies.
Procedure
- On the Eclipse menu bar click File > New > Project to
open the New Project wizard.
- Select Plug-in Project from the
list provided, then click Next to open the
New Plug-in Project wizard.
- In the Project Name field, enter
a name for the project and in the Target Platform section, select an
OSGi framework and select standard from
the menu. Click Next. The Content pane is displayed.
- In the Version field remove the ".qualifier" from
the end of the version number. The qualifier is not currently supported.
- In the Execution Environment field
select the Java level that matches
the execution environment in your CICS runtime
target platform.
- Clear the Generate an activator check
box and click Finish. The
new plug-in project is created in the Package Explorer view.
- Required: Requirement: You
must now edit the plug-in manifest file and add the JCICS API dependencies.
If you do not perform these steps, you will be able to export and
install the bundle, but it will not run.
- In the Package Explorer view, right-click the project
name and click PDE Tools > Open Manifest. The manifest file opens in the manifest editor.
- Select the Dependencies tab and
in the Imported Packages section, click ADD. The Package Selection dialog opens.
- Select the package com.ibm.cics.server and
click OK. The package is displayed
in the Imported Packages list.
- Optional: Optional: Repeat the previous
step to install the following package, if required for your application:
Table 1. Package |
Description |
com.ibm.record |
The Java API for legacy programs that use IByteBuffer from
the Java Record Framework that came with VisualAge. Previously in
the dfjcics.jar file. |
com.ibm.cics.samples |
Samples for redirecting System.out and System.err. Replaces
the dfjoutput.jar file. |
- Press Ctrl +S to save the manifest file.
Results
The new plug-in project is created containing the JCICS
API dependencies.
What to do next
You can now create your CICS Java application. If you are new
to developing Java applications
for CICS, you can use the JCICS
samples provided with the CICS Explorer® SDK to help you get started.
Note: After you have
developed your application, you must add a CICS-MainClass declaration
to the manifest file and declare the classes used in the application.
See the related link for more information.
For more information
on plug-in development, see the section "Platform plug-in developer
guide" in the Eclipse Help documentation.
When your Java application is finished, you
must deploy it in a CICS bundle
to zFS. CICS bundles can contain
one or more plug-ins and are the unit of deployment for your application
in CICS.