You must deploy the pbjvm105.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.
When an InfoMaker application requires a Java VM, InfoMaker searches for the jvm.dll file in a subdirectory of the directory where pbjvm105.dll is installed on the user’s computer. The jvm.dll file is installed in the JRE\bin\client directory of JDK 1.4 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 InfoMaker 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 pbjvm105.dll is installed. Suppose pbjvm105.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:
Search for the directory structure JRE\bin\client (for JDK 1.4) in C:\Sybase\Shared\PowerBuilder\ and, if found, add it to the beginning of the path.
If not found, search for the directory structure JDK1.4\JRE\bin\client in C:\Sybase\Shared\PowerBuilder\ and, if found, add it to the beginning of the path.
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 not found, search for the directory structure JDK1.3\JRE\bin\classic 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.
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:
The InfoMaker runtime static registry classpath. This is a path built into the pbjvm105.dll file that corresponds to the path in the Windows Registry that is used when you are developing an application in InfoMaker. It contains classes required at runtime for features that use a Java VM.
The system CLASSPATH environment variable.
The current directory.
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:
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.
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.
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\10.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.