First you need to create a project to contain the procedural COBOL program, and make it available for execution from a Java
program:
- Start
Enterprise Developer
for Eclipse.
- 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)).
- If you are presented with the Welcome page, click
Open Team Developer Perspective.
- In the
Application Explorer view, expand the
Enterprise Developer@Windows
n node and click
Enterprise Development Projects.
- Click
.
- Expand
Micro Focus COBOL.
- Click
COBOL JVM Project.
- Click
Next.
This opens the
New COBOL JVM Project dialog box.
- Type
CobolBook in the
Project name field.
- In the
JRE section, ensure that a Java 7 run-time environment is selected by using one of the options available. If a Java 7 version
is not already showing for any of the available options, click
Configure JREs and add one.
- 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:
- In the
Application Explorer view, right-click the CobolBook project, and click
.
This opens the
New COBOL JVM Package dialog box.
- Type
com.microfocus.book in the
Name field. Click
Finish to create the package.
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.