Java support

You must deploy the pbjvm125.dll file with any applications or components that use the Java Runtime Environment (JRE), and there must be a JRE installed on the target computer. The JRE is required for JDBC connections. You can copy the JRE installed with InfoMaker to the same directory as the PowerBuilder runtime files on the target computer, or use an existing JRE whose location is defined in the user’s system PATH environment variable.

Locating the Java VM

When an InfoMaker application requires a Java VM, the runtime searches for the jvm.dll file in a subdirectory of the directory where pbjvm125.dll is installed on the user’s computer. The jvm.dll file is installed in the JRE\bin\client directory of JDK 1.4 and later installations, and in the JRE\bin\classic directory in JDK 1.2 and 1.3 installations.

InfoMaker adds the location of jvm.dll to the beginning of the path currently being used by the PowerBuilder application. This path is a copy of the path defined in the user’s PATH system environment variable. InfoMaker does not modify the environment variable maintained in the Windows registry.

To locate the jvm.dll, InfoMaker first determines where pbjvm125.dll is installed. Suppose pbjvm125.dll is installed in C:\Sybase\Shared\PowerBuilder.

Then InfoMaker uses this search procedure to add the location of the jvm.dll to the path currently in use:

  1. Search for the directory structure JRE\bin\client (for JDK 1.4 or later) in C:\Sybase\Shared\PowerBuilder\ and, if found, add it to the beginning of the path.

  2. If not found, search for a JDK directory structure that contains JRE\bin\client in C:\Sybase\Shared\PowerBuilder\ and, if found, add it to the beginning of the path.

  3. If not found, search for the directory structure JRE\bin\classic (for JDK 1.2 or 1.3) in C:\Sybase\Shared\PowerBuilder\ and, if found, add it to the beginning of the path.

If none of these directory structures is found, InfoMaker uses the first jvm.dll whose location is defined in the user’s PATH environment variable. If no jvm.dll is found, the Java VM does not start.

The runtime Java VM classpath

When an InfoMaker application starts a Java VM, the Java VM uses internal path and classpath information to ensure that required Java classes are always available. At runtime, the Java VM uses a classpath constructed by concatenating these paths:

Overriding the runtime static registry classpath

If necessary, you can override the JVM settings and properties defined for runtime use in the static registry. InfoMaker uses the following algorithm to locate configuration information:

  1. When the first request is made for a JVM, InfoMaker looks for registry entries for the configuration information and properties to be passed to the function that creates the JVM.

  2. If InfoMaker finds a registry entry for the configuration information, it uses it instead of the static registry. If it does not find a registry entry, it uses the static registry.

  3. If InfoMaker finds a registry entry for custom properties to be passed to the JVM, it uses those instead of the static registry. If it does not find a registry entry, it uses the static registry entries

To override the default settings, create a new key named PBRTConfig in the HKEY_LOCAL_MACHINE\Software\Sybase\InfoMaker\12.5\Java key, then add either or both of the following subkeys: PBJVMconfig and PBJVMprops.

To duplicate the static registry entries, add the same string values to these subkeys that you see in the PBIDEConfig key, that is:

Subkey

String value name

String value data

PBJVMconfig

Count

1

0

-verbose:jni,class

PBJVMprops

java.compiler

NONE

You can override either the configuration or properties entries or both. If you make incorrect entries, InfoMaker attempts to recover by defaulting to the static registry. However, you should be cautious about making any changes since you can cause incorrect behavior in the JVM if you do not configure it correctly.