English

How To: Configure a runtime environment for ArcGIS Java Extensions

Summary

Instructions provided describe an alternative to using the user interface based JVM Config tool to configure a runtime environment for Java extensions in ArcGIS 9.3.1.

ArcGIS 9.3.1 provides the ability to extend ArcGIS using Java. In addition to supporting the automatic registration and hosting of Java extensions in ArcGIS applications, a tool for configuring the environment for the extensions is provided. By using this tool, JVM options can be configured to run extensions for troubleshooting purposes.

The JVM Config tool may not be suitable for use with installer programs or setup scripts that apply settings automatically, so an alternative method can be used.

Information provided includes examples of how to write Java configuration settings into a REG file and import it into the Windows registry. REG files are text-based, human-readable files for storing portions of the Windows registry. Windows registry files (.reg) contain settings that can be imported into the Windows registry.

Procedure

For general instructions on working with REG files to add, modify, and delete registry keys, refer to the following linked Microsoft KB article about modifying the Windows registry.

Warning:
The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary.
ESRI cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.

Example 1: Selecting the default JVM and setting remote debugging ports.
[O-Image]
REG File (Windows):

Code:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Java Extensions]
"JVM"="C:\\Program Files\\Java\\jre6\\bin\\client\\jvm.dll"
"Arguments"="-Xms3m -Xmx64m -Xss512k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8013"
"BeginPort"="8013"
"EndPort"="8018"
"Console"="0"
"Logging"="0"


REG File (UNIX):

Code:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Java Extensions]
"JVM"="/home/engine/jre6/bin/client/libjvm.so"
"Arguments"="-Xms3m -Xmx64m -Xss512k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8013"
"BeginPort"="8013"
"EndPort"="8018"
"Console"="0"
"Logging"="0"

Example 2: Selecting the default JVM and enabling Java Interop Logging.
[O-Image]
REG File (Windows):

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Java Extensions]
"JVM"="C:\\Program Files\\Java\\jre6\\bin\\client\\jvm.dll"
"Arguments"="-Xms3m -Xmx64m -Xss512k"
"BeginPort"=""
"EndPort"=""
"Console"="0"
"Logging"="1"


REG File (UNIX):

Code:
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Java Extensions]
"JVM"="/home/engine/jre6/bin/client/libjvm.so"
"Arguments"="-Xms3m -Xmx64m -Xss512k"
"BeginPort"=""
"EndPort"=""
"Console"="0"
"Logging"="1"

Importing a REG file into the registry:

Code:
Windows: c:\>regedit.exe /s <filename.reg>

UNIX: bash3.2$ regedit –c <filename.reg>

Note:
The regedit tool on UNIX is available only with ArcGIS products, and the necessary initialization scripts for those products (ArcGIS Engine/ArcGIS Server) need to be run before invoking the regedit tool.

Related Information