In this topic
Proxygen tool for Windows
The Proxygen tool enables you to write custom extensions to ArcObjects in a Component Object Model (COM) compliant language and access those extensions from Java code. The Proxygen tool basically generates Java proxies (wrappers) from COM type libraries by using type information from .tlb, .olb, and .dll files (that embed type information). These proxies can then be added to any ArcGIS Engine Java project to consume the custom extension. The Proxygen tool is installed at <ArcGISInstallDir>\java\tools.
Running the Proxygen tool at the command line
At the command prompt, run %AGSDEVKITJAVA%\java\tools\proxygen <XXX.txt>.
- The custom extensions are specified in the text file as comma separated triple on a new line. The triple describes the location of the type library, a Java package name, and the output location for the generated Java proxies, respectively. Make sure, the text file does not have extra new line characters. The following is an example of the content of a sample text file:
- C:\TypeInfo\TypeLibrary1.olb, package, C:\Temp\JavaProxies\package
- C:\TypeInfo\TypeLibrary2.tlb, test, C:\Temp\JavaProxies\test
- The tool expects absolute paths for the type libraries and the output directory location. Path names should be Windows style paths and can contain spaces, for example, C:\Program Files\...
- The Proxygen tool attempts to create the output directory, if one does not exist. If the attempt results in a failure, it exits. Manually create the output directory structure and rerun the tool.
- The Proxygen tool does not generate type information for types included from external libraries (it assumes the generic Java type object). Support for type-safe proxy generation is expected in a subsequent release.
Proxygen by default, registers on the machine the type library for which it generates proxies. However, the type library and COM extensions should be registered manually on every other machine that consumes the extensions.