The API can use a configuration file called prefs.config
to set several properties. Normally, you do not need this file because the default settings are adequate for most purposes.
If the prefs.config
file exists, it is in one or more of the following locations:
C:\Documents and Settings\<username>\Application Data\PureEdge\API 8.0\Prefs\prefs.config
C:\Documents and Settings\All Users\Application Data\PureEdge\API 8.0\Prefs\prefs.config
When determining the configuration, the API first looks at the configuration file in the user specific folder, then the file in the All Users
folder. The API will read both configuration files, but any settings in the user specific folder will override settings in the All Users
The configuration file uses tag value pairs to set the following properties:
|overrideDefaultPathToNetscapeProfile||The path to your Netscape certificate store. If the path is not provided, the API will attempt to locate the certificate store automatically.|
|overrideDefaultPathToNetscapeSecurityLibraries||The path to your Netscape security libraries. To determine this path, search for nss3.dll.|
|javaPath||The path to your Java™ virtual machine. If you do not provide a path, the API will attempt to locate the Java VM automatically. In most cases, automatic detection will succeed under Windows™.|
Note: If the calling program is running in an application server such as WebSphere® Application Server, or in a portal server such as WebSphere Portal, the javaPath must point to the same JVM that the application server uses.
|checkCRLDistribution Points||An on or off value. If on, the API will check CRL distribution points whenever verifying a digital certificate. This requires Internet access, and will slow the verification process. If off, the API will only use locally stored CRLs to verify certificates.|
|javaVM||Sets the default Java Virtual Machine. Once set, the API will use that JVM if it is available, otherwise it will locate the latest JVM installed on the computer. |
Set this to the string that the JVM uses to register itself. For example, " Sun VM <version> ". The version is guaranteed to include a major and minor number, and may include further information, such as a maintenance number, build number, and so on.
Since it can be difficult to get an exact match, you can use the * wildcard in the version string. For example, you might use the following string:
This will match any version beginning with 1.4, such as "1.4.2_03 JDK" or "1.4 JDK". When there are multiple matches, the match that will be selected is indeterminate, so it is best to be specific.
Additionally, the API always chooses the JDK over the JRE. For example, if you search for "Sun VM 1.4*", and you have "Sun VM 1.4.2_03 JDK" and "Sun VM 1.4.2_03 JRE" installed, the API will use the JDK.
Note that this setting is for Windows only.
|jvmOptions.x||Allows you to pass configuration options to the Java VM. Each option must have its own numbered entry as shown: |
jvmOptions.1 = <config setting 1>
jvmOptions.2 = <config setting 2>
By default, the API does not pass any configuration options.
|javaIgnoreUnrecognized||An on or off value. If on, the Java VM will ignore unrecognized options used in the javaOptions setting. If off, the Java VM will report unrecognized options in the javaOptions setting. Default is off.|
|domspooltodiskthreshold||The in-memory size of form enclosures, in bytes. Enclosures that are greater than this threshold are removed from memory and spooled to a temporary file in the system temp folder.|
The default size is 32768 bytes. If you do not want enclosures to be spooled to disk, set the size to 0 (zero).
Note that the size is the space that the enclosure takes when in memory; its file size might be different.
|schemasFolder||Allows you to specify the path to the schemas folder for any external schemas required by an application or its forms. If no schemasFolder setting is specified, and an external schema is referenced, the API will look for a schemas folder in the same directory as the currently running application.|
|defaultDateFormat||Allows you to specify the format to assume for ambiguous dates that are entered by users. Valid settings are: DayMonthYear, MonthDayYear, YearMonthDay|
The default is MonthDayYear. For example, by default the date 01/02/09 will be interpreted as January 2, 2009.
To configure the API, open the prefs.config
file in a text editor and set the preferences accordingly. If you do not include a particular setting, the default is used instead. For example, your prefs.config
file might look like this:
checkCRLDistributionPoints = off
In this case, the API will automatically detect both the location of the Netscape Profile and the location of the Java
virtual machine. However, the API will not check CRL distribution points and will use the default configuration options for the Java
Parent topic: Configuring the API on Windows