Processing Java™ code that is generated into a directory
This topic describes how to process Java™ code that is generated into a directory. It is recommended, however, that you avoid generating Java™ code into a directory; for details, see Generating Java code into a project.
To generate Java™ code into a directory, specify the genDirectory build descriptor option and avoid specifying the genProject build descriptor option.
Your next tasks depend on the project type:
- Application client project
- For an application client project, follow these steps:
- Provide runtime access to fda7.jar by following these steps:
- Access the JAR files from the following directory:
shared_resources\plugins\ com.ibm.etools.egl.java.runtime_version- shared_resources
- The shared resources directory for your product, such as
C:\Program Files\IBM\SDP70Sharedon a Windows™ system or/opt/IBM/SDP70Sharedon a Linux™ system. If you installed and kept a previous version of an IBM® product containing EGL before installing your current product, you may need to specify the shared resources directory that was set up in the earlier installation. - version
- The installed version of the plugin. If more than one is present, use the one with the most recent version number, unless you have a reason to use an older version.
- Copy the file into each enterprise application project that references the application client project.
- Update the manifest in the application client project so that the jar files (as stored in an enterprise application project) are available.
- Access the JAR files from the following directory:
- Provide access to non-EGL JAR files (an optional task).
- Import your generated output into the project, in keeping with
these rules:
- The folder appClientModule must include the top-level folder of the package that contains your generated output.
- The hierarchy of folder names beneath appClientModule must match the name of your Java™ package.
appClientModule/my/trial/package - If you generated a J2EE environment file, use that to update the J2EE deployment descriptor.
- Now that you have placed output files in a project, continue setting up the J2EE runtime environment.
- Provide runtime access to fda7.jar by following these steps:
- J2EE web project
- For a web project, follow these steps:
- Provide access to the EGL JAR file by copying fda7.jar into your
web project folder. To do so, import the external JARs found in the
following directory:
shared_resources\plugins\ com.ibm.etools.egl.java.runtime_version- shared_resources
- The shared resources directory for your product, such as
C:\Program Files\IBM\SDP70Sharedon a Windows™ system or/opt/IBM/SDP70Sharedon a Linux™ system. If you installed and kept a previous version of an IBM® product containing EGL before installing your current product, you may need to specify the shared resources directory that was set up in the earlier installation. - version
- The installed version of the plugin. If more than one is present, use the one with the most recent version number, unless you have a reason to use an older version.
The destination for the files is the following project folder:WebContent/WEB-INF/lib - Provide access to non-EGL JAR files (an option)
- Import your generated output into the project, in keeping with
these rules:
- The WebContent folder must include the top-level folder of the package that contains your generated output.
- The hierarchy of folder names beneath WebContent must match the name of your Java™ package.
WebContent/my/trial/package - Update the J2EE deployment descriptor.
- Now that you have placed output files in a project, continue setting up the J2EE runtime environment.
- Provide access to the EGL JAR file by copying fda7.jar into your
web project folder. To do so, import the external JARs found in the
following directory:
- Java™ project
- If you are generating code for use in a non-J2EE environment,
you generate a properties file if you use the following combination
of build descriptor options:
- genProperties is set to GLOBAL or PROGRAM; and
- J2EE is set to NO.
For a Java™ project, you have the following tasks:- Provide access to the EGL JAR file by adding the following entry
to the project's Java™ build
path:
EGL_GENERATORS_PLUGINDIR/fda7.jarFor details on the variable at the beginning of each entry, see Setting the variable EGL_GENERATORS_PLUGINDIR.
- 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 db2jcc.jar. If your generated code accesses WebSphere® MQ message queues, provide access to non-EGL jar files
- Make sure that the global properties file (rununit.properties, if present) is in the top-level project folder and that the program properties file (if present) is either in the folder that corresponds to the last qualifier in the package name or in the top-level project folder. The top-level folder is used if the package name is not specified in the EGL source file.
- Place a linkage properties file in the project (an optional task).