set javavmpath
set javavmpath= { vmpath | msjava.dll}
This command specifies the type and location of the Java Virtual Machine (JVM) to use when calling Java classes from Arbortext Editor.
This command can be set to either a full path (vmpath), or the file name msjava.dll.
|
Specifying set javavmpath to a JVM other than the one delivered with Arbortext Editor will override it. The JVM version delivered with Arbortext Editor is the only version Arbortext supports. If you choose to run another JVM, you may experience problems.
|
If this option is not set, Arbortext Editor will use the Sun JVM located in the Arbortext Editor installation directory. For instance, the path could be Arbortext-path\bin\jre\bin\client\jvm.dll.
If the option is set to a full path (vmpath), then Arbortext Editor uses the specified JVM for the current session.
If the option is not set, Arbortext Editor performs the following checks:
1. If the Sun Java DLL still resides in the Arbortext Editor installation directory, Arbortext Editor uses this JVM.
2. Arbortext Editor checks the Windows registry to locate a public Sun JVM.
3. If neither check is successful, then Arbortext Editor will have no JVM available and will return an error if you attempt to invoke Java code from within Arbortext Editor.
The setting for javavmpath is only evaluated when the first java_type function is called in a Arbortext Editor session. Subsequent changes to set javavmpath will not affect the running Java Virtual Machine unless you exit Arbortext Editor and start a new session. Consequently, when using the java_type functions, you should set javavmpath before invoking a java_type function.
Examples:
set javavmpath=msjava.dll
If set javavmpath is used with Arbortext Publishing Engine, you should protect it from being sourced again after the JVM has started. Put the set javavmpath statement inside an appropriate if statement. For example:
# Try to change this value only if the JVM has not started yet.
# This protects from failure in case this file is sourced again
# after the JVM has already started.
if (!java_init()) {
set javavmpath="D:\jre\lib\jvm.dll"
}
Related Topics