In this lesson, you will enable EGL and create an EGL project
to hold your EGL source files.
All code, files, and artifacts in the workbench must be associated
with a project. A project works like a top-level folder to hold your
files. In this case, you will need an EGL project for your EGL application.
- In the workbench, click . The
Preferences window opens.
- In the left pane of the Preferences window, click .
- In the list of capabilities in the right pane, select the EGL
Developer check box. Enabling this capability
tells the workbench that you will be working with EGL. You may have
many other capabilities in the list, but for now the EGL
Developer capability is the only one that matters.
- Click OK.
- Click . The
New Project window opens.
- In the New Project window, expand EGL and
click EGL Project.
- Click Next.
- In the New EGL Project wizard, assign a Project
name such as Hello.
- Click General Project. The
other types of EGL project enable particular types of user interfaces,
but since you don't need a dedicated user interface for this project,
the general EGL project is appropriate. The first
window of the New EGL Project wizard looks like this:
- Fill in the project name, and then, click Next.
- Under Target Runtime Platform, click Java. You can generate EGL code either to Java™ or to COBOL. You will use Java for this tutorial because the workbench
can run Java code directly.
- Make sure that Create a new build descriptor is
selected. Build descriptors contain options for generating
your program into another language. You do not need to worry about
them at this point because the wizard will create an appropriate build
descriptor for you. The second window of the New
EGL Project wizard looks like this:
- Click Finish.
- You may see a message window that asks, "This kind of project
is usually associated with the EGL Perspective. Do you want to switch
to this perspective now?" If you see this window, click Yes. The different workbench perspectives display editors, information
windows, and tools appropriate to specific tasks. The Project
Explorer view in the upper left of the default workbench
displays a new folder called Hello. This is your
new EGL project.
- Expand the Hello project by clicking the plus sign next
to it and note the folders and files that EGL automatically created
for you.
The EGLSource folder will contain your
EGL code. Right now, it contains an EGL build file named Hello.eglbld,
which contains an EGL Build Descriptor part. By default, the EGLSource
folder contains an EGL deployment descriptor file named Hello.EGLDD.
The deployment descriptor file contains information on deploying your
project as a web service and information on web services in other
applications that your project will use. Since your project will not
contain or use any services, you can ignore this file for now.
Now you have an EGL project. In the next lesson, you will
create an EGL program in this project.