Now that we've covered the basic features of the Eclipse IDE, it is time for you to create your first simple Hello COBOL World application:
By default, when you start Eclipse, it displays the Eclipse Launcher dialog box prompting you to specify a path for the Eclipse workspace. Specify a path and click Launch.
If this is the first time you start Eclipse, you now see the Eclipse Welcome page. See The Eclipse Welcome Page in this Introduction.
Click Open COBOL Perspective as this perspective is the most suitable one for COBOL development.
By default, the project will be created in the workspace that you selected when you started the Eclipse session.
You need to create a program in your project to hold the COBOL source code:
The New COBOL Program wizard is displayed.
This adds a template COBOL program to your project and opens it in the editor.
program-id. helloworld as "helloworld". environment division. configuration section. data division. working-storage section. procedure division. display 'Hello COBOL World!'. goback. end program helloworld.
By default, Eclipse builds your project automatically. If you haven't configured Eclipse to do this, you can build a project at any time by clicking Project > Build Project.
The progress of the project build is displayed in the Console view.
When your project has been built, a folder called New_Configuration.bin is created in your project. Expand the folder in the COBOL Explorer view to see the executable and some .obj (Windows) or .o (UNIX) files.
You can now run the application.
Applications you create in Eclipse need a launch configuration to execute. You are going to create a run configuration for the Hello COBOL world application as follows:
A default COBOL Launch Configuration is created in the wizard showing HelloCOBOLWorld as the project to run and New_Configuration.bin/HelloCOBOLWorld.exe (Windows) or New_Configuration.bin/HelloCOBOLWorld (UNIX) as the main program to run.
This opens a console window with Hello COBOL World! printed in it.
Preserve this project because you are going to use it again for a different demonstration included in this Introduction.
Continue with the next section, Advanced details, which includes information about configuring the IDE and your projects, and on editing, building, running and debugging applications in Eclipse.