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.
  2. Expand the Micro Focus COBOL node and select COBOL JVM Project. Click Next.
  3. Set the Project name field to "CobolBook".
  4. Ensure Use default location is checked.
  5. Ensure that the JRE is set up to use a Java 6 VM.
  6. Click Finish.
This creates a blank JVM COBOL project to contain the procedural COBOL program that will be imported 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. Right click on the src folder in COBOL Explorer and select Import > Import > General > File System.
  2. Click Next.
  3. Click Browse and navigate to <tutorial_source_folder>\COBOLBook\src.
  4. Click OK.
  5. Select src in the left-hand pane.
  6. Click Finish to import the files into the project.