Microsoft SDK for Java

Invocation Interfaces Reference

The invocation interfaces are used to launch applications in the Microsoft virtual machine (Microsoft VM). The globally unique identifiers (GUIDs) for the invocation interfaces are defined in %SDKDIR%\Include\javaexec.h.

The invocation interfaces are as follows:

IJavaExecute

IJavaExecute2

IEnumJAVAPROPERTY

For details about the structures these interfaces use, see Invocation Interface Structures.

The Microsoft VM can load .class files and other Java visible resource files from Microsoft® Win32® portable executable (PE) image files (.exe and .dll files). In order for the Microsoft VM to find Java resources from within a PE, the Java resources must be stored within the PE as Win32 resources. The header file %SDKDIR%\Include\jexefmt.h describes the format of the data that must be stored within the resources of a PE image in order for the Microsoft VM to locate Java resources within that image. This format is referred to as the exegen format. There are two versions of it, depending on the version of your Microsoft VM.

Finding Java Resources in a PE Image

Assuming a Microsoft® Win32® PE image that has Java resources bound to it, there are three ways to tell the Microsoft VM that it should look for resources within that module:

  1. If the resources are bound into a DLL, then that DLL can be placed on the class path. The syntax is the same for adding a .zip file to the class path. The .dll extension must be specified. There is a restriction on how a DLL must be built in order to be placed on the class path. In particular, the resource containing the file directory must be stored in a resource with a specific ID.

  2. The COM interface IJavaExecute2::SetClassSource can be used to add a Win32 module to the list of locations where the Microsoft VM searches for Java resources. See %SDKDIR%\Include\javaexec.h.

  3. The RNI function AddModuleResourceClassSource can also be used to add a Win32 module to the list of locations where the Microsoft VM searches for Java resources. See %SDKDIR%\Include\native.h.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.