Generating Java™ code into a project
If you are generating a Java™ program or wrapper, it is recommended, and in some cases required, that you set the genProject build descriptor option. This generates output into a project in your workspace.
EGL provides various services for you when you generate into a project. The services vary by project type, as do your next tasks. See the sections below to find the particular type of project you want to use. Each section has the steps you will need to follow to generate into that type of project.
Application client project
EGL_GENERATORS_PLUGINDIR/fda7.jar
EGL also provides runtime access to the EGL JAR files
by importing them into each enterprise application project that references
the application client project. EGL then updates the manifest in the
application client project, so that the JAR files in an application
client project are available. EGL also puts runtime values into the
J2EE deployment descriptor. This is so you can avoid cutting and pasting
entries from a generated J2EE environment file.- If you are calling the generated program by way of TCP/IP, provide runtime access to a listener. This is described in Setting up a TCP/IP listener for J2EE called applications and Setting up the TCP/IP listener for a called non-J2EE application.
- Provide access to non-EGL JAR files, as described in the topic "Providing access to non-EGL JAR files".
- Once you have placed output files in a project, continue setting up the J2EE runtime environment.
J2EE web project
When you generate into
an application client project, EGL provides preparation-time access
to the EGL JAR file (fda7.jar) by adding them into the project's Web
Content/WEB-INF/lib folder. EGL also puts runtime values
into the J2EE deployment descriptor. This is so you can avoid cutting
and pasting entries from a generated J2EE environment file.
- Provide access to non-EGL JAR files, as detailed in Providing access to non-EGL JAR files.
- Generate the code.
- Once you have placed output files in a project, continue as described in the topic Setting up the JEE runtime environment for EGL-generated code.
Java™ project
EGL_GENERATORS_PLUGINDIR/fda7.jar
EGL will generate a properties file under the following
conditions:- genProperties is set to GLOBAL or PROGRAM; and
- J2EE is set to NO.
- If your program accesses a relational database, make sure that your Java™ build path includes the directory where the driver is installed. For DB2®, for example, specify the directory that contains db2java.zip.
- If your code accesses WebSphere® MQ message queues, provide access to non-EGL jar files, as detailed in Providing access to non-EGL JAR files.
- Place a linkage properties file in the module.