Create the JVM project

First you need to create a project to contain the procedural COBOL program and make it available for execution from a Java program:

Create the project

  1. Click File > New > Other.

    This opens the New dialog box.

  2. Expand Micro Focus COBOL, and then click COBOL JVM Project.
  3. Click Next.

    This opens the New COBOL JVM Project dialog box.

  4. In the Project name field, type CobolBook.
  5. Ensure Use default location is checked.
  6. Ensure that the project is set up to use a Java 7 JRE.
  7. Click Finish.
This creates a blank JVM COBOL project to contain the procedural COBOL program that you are to import into the Web application.
Note: If Eclipse prompts you to switch to the COBOL perspective then do so. In general, any action that uses the CobolBook project is expected to be carried out in the COBOL perspective. The dynamic web project that comes later in this tutorial is expected to be done in the Java EE perspective. To change perspectives later, click on the appropriate option in the top right of the Eclipse main window.

Add the COBOL source files

The project uses two source files, book.cbl and book-rec.cpy, that need to be imported into your project.

  1. In COBOL Explorer, right-click the CobolBook project, and then click Import > Import.

    This opens the Import dialog box.

  2. Expand General folder, and then click File System.
  3. Click Next.
  4. Click Browse and navigate to <tutorial_source_folder>\COBOLBook\src.
  5. Click OK.
  6. Check src in the left pane.
  7. Click Finish.

    This imports the files into the project.