Creating the JVM COBOL Project

First you need to create a project to contain the procedural COBOL program, and make it available for execution from a Java program:
  1. Start Enterprise Developer for Eclipse.
  2. When prompted for the workspace name, type the name of a folder into which you wish to store the tutorial project (for example, C:\projects (Windows) or ~/projects/ (UNIX)).
  3. If you are presented with the Welcome page, click Open Team Developer Perspective.
  4. In the Application Explorer view, expand the Enterprise Developer node and click Enterprise Development Projects.
  5. Click File > New > Other.

    This opens the New dialog box.

  6. Click Micro Focus COBOL > COBOL JVM Project.
  7. Click Next.

    This opens the New COBOL JVM Project dialog box.

  8. Type CobolBook in the Project name field.
  9. In the JRE section, select a Java 8 JRE. If Java 8 JRE is not already available, click Configure JREs and add one.
  10. Click Finish.

This creates a JVM COBOL project to contain the sample procedural COBOL program that you will import into the Web application later in this tutorial.

Specifying a Java package

By default, COBOL programs are placed in the default root Java package. JVM servlet containers do not always allow root package classes to be loaded, so you must set up a package for the program.
Note: The Java package system is equivalent to the JVM COBOL namespace system; these two terms are interchangeable.
To set up the package:
  1. In the Application Explorer view, right-click the CobolBook project, and click New > Folder > COBOL JVM Package.

    This opens the New COBOL JVM Package dialog box.

  2. Type com.microfocus.book in the Name field. Click Finish to create the package.
    Note: To see the new folder structure in the Application Explorer view:
    1. Click View Menu > Filters and Customzation.

      This opens the Filters and Customization dialog box.

    2. Uncheck Empty folders outside categories.
    3. Click OK.

This process creates a folder structure in the workspace, in which to store the COBOL program, and informs Java where to find it. You are now ready to set up the COBOL program.