Converting an existing Java project to a plug-in project

If you have an existing Java project, you can convert it to an OSGi plug-in project. The OSGi bundle can run in a pooled JVM environment and a JVM server.

About this task

This task assumes that you have an existing Java project in your workspace, and you want to convert it to an OSGi plug-in project.

Procedure

  1. In the Package Explorer view, right-click the Java project that you want to convert to a plug-in project, and click Configure > Convert to Plug-in Projects.
    The Convert Existing Projects dialog is displayed.
    A screen capture of the Convert Existing Projects dialog showing four Java projects available for conversion, however only one is currently selected.
    The dialog contains a list of all the Java projects in your workspace. The one you chose to convert is selected. You can change your selection, or select more than one Java project to convert to a plug-in project.
  2. Click Finish.
    The Java project is converted to a plug-in project. The project name does not change, but the project now includes a manifest file and a build properties file.
  3. Required: 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 Plug-in Tools > Open Manifest.
      The manifest file opens in the manifest editor.
    2. Important: The library is supplied in the com.ibm.cics.server.jar file. If your project manifest contains the declaration: Import-Package: dfhjcics.jar; you must remove the declaration before continuing with the remaining steps.
    3. Select the Dependencies tab, and in the Imported Packages section, click ADD.
      The Package Selection dialog opens.
    4. Select the package com.ibm.cics.server and click OK.
      The package is displayed in the Imported Packages list.
    5. Select File > Save to save the manifest file.

Results

You have successfully converted your existing Java project to a plug-in project.

What to do next

You must now update the manifest file to add a CICS®-MainClass declaration. For more information, see the related link.