Editing Java runtime properties in the EGL Build Parts Editor

When you are editing a build descriptor part in the EGL Build Parts Editor, there are two views available. One is a view where you can choose and set build descriptor options that affect generation. The second is a view where you can assign values to the following Java™ runtime properties:

Your assignments are used only if you generate Java code. If you assign values to these properties in the Build Descriptor part, and you have set the build descriptor option genProperties to GLOBAL or PROGRAM, the values you set are then stored in the corresponding Java properties and listed in the J2EE deployment descriptor (if you are deploying to a J2EE environment) or a Java properties file (if you are deploying to a non-J2EE environment). If you want to edit these settings at a later time, you can edit them in the J2EE deployment descriptor or Java properties file, without having to generate your Java code again.

To edit the properties in the Build Descriptor part, follow these steps:
  1. Locate the EGL build file you want to work with in the Project Explorer view. To find it, open the EGL Source folder, and look for a file with the extension "eglbld". Right-click on the build file to open the pop-up menu.
  2. In the pop-up menu, select Open With > EGL Build Parts Editor. The Build Parts Editor opens the Build Descriptor part automatically; the default view is the General Options view.
  3. If you have the Outline view open, you will see the Build Descriptor part listed under the name of your build file. If you do not have the Outline view open and want to open it, select Window > Show View > Other; in the Show View dialog box, click to expand General and select Outline.
  4. In the Outline view, right-click on a Build Descriptor part, and select Open. The EGL Build Parts Editor default view displays a table of build descriptor options on the left.
  5. Click the Show Java runtime Properties button
    Show Java runtime properties button
    on the editor toolbar. located at the top right corner of the Build Parts Editor.
  6. To add the vgj.jdbc.database.SN Java runtime property, do the following:
    1. On the left is a table titled "Database mappings for connect"; underneath the table, click theAdd button.
    2. Type a "Server name" that you use when coding the system word vgLib.connectionService; this value is substituted for SN in the name of the generated property.
    3. If the row in the Database mappings for connect list is not highlighted, click once to select the row, then click the JNDI name or URL field once to put the field into edit mode. Type in a value (the value for J2EE connections will be different than non-J2EE connections):
      • For J2EE connections (as is needed in a production environment), the value is the name to which the data source is bound in the JNDI registry; for example, jdbc/MyDB.
      • For a standard JDBC connection (as may be used for debugging), the value is the connection URL; for example, jdbc:db2:MyDB.
  7. To assign the date masks used when you code either vgVar.currentFormattedGregorianDate (for a Gregorian date) or vgVar.currentFormattedJulianDate (for a Julian date); or to ensure EGL validates a page field or a text-form field that has a length of 10 or more and a dateFormat property of systemGregorianDateFormat or systemJulianDateFormat, do the following:
    1. On the right is a table titled "Date Masks"; underneath the table, click the Add button. A default selection will appear on the first line.
    2. In the first column ("Locale"), click once on the line. A drop down box appears; select one of the codes in the list box. The selected value is substituted for locale in the date-mask properties listed earlier. Only one of your entries is used at run time; it is the one where the value of locale matches the value of the vgj.nls.code Java runtime property.
    3. Click the second column ("Long Gregorian Mask") once to make the field editable. Either select a mask from the list box or type a mask; characters other than D, Y, or digits can be used as separators, and the default value is specific to the locale.
    4. If you are selecting the Long Julian Mask, follow the instructions in the previous step, substituting "Long Julian Mask" for "Long Gregorian Mask."
  8. To assign the date masks used when EGL validates a page field or a text-form field that has a length less than 10 and a dateFormat property of systemGregorianDateFormat or systemJulianDateFormat, do the following:
    1. On the right is a table titled "Date Masks"; underneath the table, click the Add button.
    2. In the first column ("Locale"), click once on the line. A drop down box appears; select one of the codes in the list box. The selected value is substituted for locale in the date-mask properties listed earlier. Only one of your entries is used at run time; it is the one where the value of locale matches the value of the vgj.nls.code Java runtime property.
    3. Click the fourth column ("Short Gregorian Mask") once to make the field editable. Either select a mask from the list box or type a mask; characters other than D, Y, or digits can be used as separators, and the default value is specific to the locale.
    4. If you are selecting the Short Julian Mask, follow the instructions in the previous step, substituting "Short Julian Mask" for "Short Gregorian Mask."
  9. To remove an assignment, click on it, then click the Remove button.

Feedback