Application API for Java (obsolete)
The objects described in this section (Application API for Java) are obsolete from v2012 onwards.
For information about how to access the Application API from Java code, see the section: Programming Languages | Java.
The Application API in Java has an interface built up of Java classes, each of which corresponds to an object in the Application API. Developers can use these Java classes to interact with the COM API. These classes are listed below and described in subsequent sections. For a description of the Application API objects themselves, see the Application API documentation. Bear in mind that some API features are only available in scripting environments; these have therefore not been ported to Java.
Implementation of COM properties in Java
Properties in Java have been defined to include both a set and get method (set if it is allowed by the COM implementation). For example, the COM class Document contains the GridView property. In Java the method is called SpyDoc and the property is defined as a GetGridView method.
If you encounter compiling problems, please check the following points:
|•||The xmlspylib.dll must be available in ..\windows\system32.|
|•||The XMLSpyInterface.jar file must be inserted in the ClassPath environment variable.|
Setting the ClassPath variable in Windows XP
|1.||Click Start | Settings | Control panel | System | Advanced | Environment Variables. This opens the Environment Variables dialog box.|
|2.||If a ClassPath entry already exists in the System variables group, select the ClassPath entry, and click the Edit button. Edit the path to: "C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar".|
If a ClassPath entry does not exist in the System variables group, click the New button. The New System Variable dialog pops up. Enter CLASSPATH as the variable name, and "C:\Program Files\Altova\xmlspy\XMLSpyInterface.jar" as the ClassPath variable (alter the path to match your installation, if necessary).
© 2019 Altova GmbH