Creating a plug-in project

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

  1. On the Eclipse menu bar click File > New > Project to open the New Project wizard.
  2. Select Plug-in Project from the list provided, then click Next to open the New Plug-in Project wizard.
  3. 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.
    A screen capture of the New Plug-in Wizard
    Click Next.
    The Content pane is displayed.
  4. In the Version field remove the ".qualifier" from the end of the version number. The qualifier is not currently supported.
  5. In the Execution Environment field select the Java level that matches the execution environment in your CICS runtime target platform.
    A screen capture of the Execution Environment field with the menu selected and showing the list of options available for selection.
  6. Clear the Generate an activator check box and click Finish. The new plug-in project is created in the Package Explorer view.
  7. 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.
    1. In the Package Explorer view, right-click the project name and click PDE Tools > Open Manifest. The manifest file opens in the manifest editor.
    2. Select the Dependencies tab and in the Imported Packages section, click ADD. The Package Selection dialog opens.
    3. Select the package com.ibm.cics.server and click OK. The package is displayed in the Imported Packages list.
    4. Optional: Repeat the step above 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.
    5. 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: When 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.