Providing access to non-EGL jar files
You may need to provide access to non-EGL jar files to debug and run your EGL-generated Java code. The process for providing access to those files varies by project type:
- Application client project
- Before using the interpretive debugger, reference the non-EGL jar files in the CLASSPATH variable, as described in Setting preferences for the EGL debugger.
Before running your code (with or without the EGL Java debugger), do as follows:
- For each enterprise application project that references the application client project, import jar files of interest from a directory in the file system:
- In the Project Explorer view, right-click an enterprise application project and click Import
- At the Select page, click File System
- At the File System page, specify the directory in which the jar files reside
- At the right of the page, select the jar files of interest
- Click Finish
- Update the manifest in the application client project so that the jar files in the enterprise application project are available at run time:
- In the Project Explorer view, right-click your application client project and click Properties
- At the left of the Properties page, click Java JAR Dependencies
- When the section called Java JAR Dependencies is displayed at the right of the page, set each check box that corresponds to a jar file of interest
- Click OK
- EJB project
Before using the interpretive debugger, reference the non-EGL jar files in the CLASSPATH variable, as described in Setting preferences for the EGL debugger.
Before running your code (with or without the EGL Java debugger), do as follows:
- For each enterprise application project that references the EJB project, import jar files of interest from a directory in the file system:
- In the Project Explorer view, right-click an enterprise application project and click Import
- At the Select page, click File System
- At the File System page, specify the directory in which the jar files reside
- At the right of the page, select the jar files of interest
- Click Finish
- Update the manifest in the EJB project so that the jar files in the enterprise application project are available at run time:
- In the Project Explorer view, right-click your EJB project and click Properties
- At the left of the Properties page, click Java JAR Dependencies
- When the section called Java JAR Dependencies is displayed at the right of the page, set each check box that corresponds to a jar file of interest
- Click OK
- Java project
- Before running your code with the interpretive debugger, reference the non-EGL jar files in the CLASSPATH variable, as described in Setting preferences for the EGL debugger.
Before running your code with the EGL Java debugger, add entries to the project's Java build path:
- In the Project Explorer view, right-click your Java project and click Properties
- At the left of the Properties page, click Java Build Path
- When the section called Java Build Path is displayed at the right of the page, click the Libraries tab
- For each jar file to be added, click Add External Jars and use the Browse mechanism to select the file
- To close the Properties page, click OK
- J2EE Web project
- Before using the interpretive debugger, reference the non-EGL jar files in the CLASSPATH variable, as described in Setting preferences for the EGL debugger.
Before running your code (with or without the EGL Java debugger), import the jar files from the file system to the following Web project folder:
Web Content/WEB-INF/libThe import process is as follows for a set of jar files in a directory:
- In the Project Explorer view, expand the Web project, expand Web Content, expand WEB-INF, right-click lib, and click Import
- At the Select page, click File System
- At the File System page, specify the directory in which the jar files reside
- At the right of the page, select the jar files of interest
- Click Finish
The following jar-file requirements are in effect:
- A generated Java program that accesses MQSeries in any way requires MQ Series Classes for Java; in particular, the Java program needs the following jar files (although not at preparation time):
- com.ibm.mq.jar
- com.ibm.mqbind.jar
If you have WebSphere MQ V5.2, the software is in IBM WebSphere MQ SupportPac MA88, which you can find by going to the IBM web site (www.ibm.com) and searching for MA88. Download and install the software; then you can access the jar files from the Java\lib subdirectory of the directory where you installed that software.
If you have WebSphere MQ V5.3, you can get the equivalent software by doing a custom install and selecting Java Messaging. Then you can access the jar files from the Java\lib subdirectory of the MQSeries installation directory.
- A generated Java program or wrapper that uses the protocol CICSJ2C to access CICS for z/OS requires access to connector.jar and cicsj2ee.jar, but only at run time. Those files are available to you when you install the CICS Transaction Gateway.
Note: Access of CICS is possible when the EGL Java debugger runs in J2EE. Calls to CICS are attempted but fail, however, when that debugger runs outside of J2EE or when you are using the EGL interpretive debugger, which always runs outside of J2EE.
- A generated Java program that accesses an SQL table requires a file that is installed with the database management system--
- For DB2 UDB, the file is one of the following:
sqllib\java\db2java.zip sqllib\java\db2jcc.jarThe second of those files is available with DB2 UDB Version 8 or higher, as described in the DB2 UDB documentation.
- For Informix, the files are as follows:
ifxjdbc.jar ifxjdbcx.jar- For Oracle, consult the Oracle documentation.
The database file is required at run time, and can be used to validate SQL statements at preparation time.
Related tasks
Setting preferences for the EGL debugger
Setting up the J2EE run-time environment for EGL-generated code