Compiling Eclipse Projects

Prerequisites

Compiling Eclipse projects has the following requirements:

  • A licensed version of one of the following products:
    • Micro Focus Enterprise Developer
    • Micro Focus Enterprise Developer Build Tools

    You need to specify the installation location of the Micro Focus product you have as Micro Focus COBOL: Install Location in the Micro Focus Enterprise extension settings.

  • Apache Ant must be installed and the path to its bin folder added to the PATH.

You can use the Micro Focus Enterprise extension to compile COBOL (both native and JVM COBOL) and PL/I source files that include the .cobolBuild or the .pliproj project file created with Enterprise Developer for Eclipse.

If a folder opened in Visual Studio Code contains the .cobolBuild project file, the Micro Focus Enterprise extension will automatically generate a task for compiling the project via Ant. You can manually configure the build task, if required.

Compiling native COBOLor PL/I code

To compile COBOL sources:

  1. Ensure the folder that contains your sources is opened in Visual Studio Code.
  2. Click Terminal > Run Build Task.

    This shows the Task Picker with the supplied build task:


    Ant build task
  3. Select COBOL: Ant (.cobolBuild) to trigger a build.

    The build output is displayed in the Terminal window. Any errors are underlined with red squiggly lines in the editor.

  4. Check the Problems panel for any issues. Double-click any of the rows to navigate to the lines of code in the editor that contain the issue.

Optionally, you can configure the build task as follows:

  1. Click Terminal > Configure Tasks.
  2. Select COBOL: Ant (.cobolBuild) from the Task Picker.

    This loads the tasks.json file for your sources in the editor.

To compile PL/I sources:

  1. Ensure the folder that contains your sources is opened in Visual Studio Code.
  2. Click Terminal > Run Build Task.

    This shows the Task Picker with the supplied build task:


    Ant build task
  3. Select PL/I: Ant (.pliBuild) to trigger a build.

    The build output is displayed in the Terminal window. Any errors are underlined with red squiggly lines in the editor.

  4. Check the Problems panel for any issues. Double-click any of the rows to navigate to the lines of code in the editor that contain the issue.

Optionally, you can configure the build task as follows:

  1. Click Terminal > Configure Tasks.
  2. Select PL/I: Ant (.pliBuild) from the Task Picker.

    This loads the tasks.json file for your sources in the editor.

Compiling JVM COBOL projects

If your JVM COBOL project contains the .cobolProj project file, the Micro Focus Enterprise extension will automatically build it after your sources are opened in Visual Studio Code.