Proxygen tool instructions
proxygen is a tool that is used to generate Java proxies from COM type libraries. This allows you to write custom extensions to ArcObjects in a COM compliant language and access those from Java. It is installed in the ARCGISHOME\java\tools directory. The following are details about the tool:
- proxygen.exe can generate Java proxies by using type information from .tlb, .olb and .dll files (that embed type information).
- proxygen.exe should be run from the command line and be provided a text file that contains a comma separated triple, on each new line. Each line describes the location of the type library, a Java package name and the location where to place the generated Java proxies, respectively. Note that there should be no extra new line characters in the text file. The context of a sample text file are as follows:
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. E.g C:\Program Files\...
- proxygen will attempt to create the output directory, if one does not already exist. If the attempt results in a failure, it will exit. The output directory structure should then be manually created, before running the tool the next time.
- proxygen will not generate type information for types included from external libraries. It will assume the generic Java type – Object, at such places. Support for type safe proxy generation will come in a subsequent release.
For a detailed example of using the proxygen tool, refer to Create and consume custom C++/COM components.