Freigeben über


Verwenden des Microsoft-SDK für Java

Gilt für: Access 2013, Office 2013

Das Microsoft SDK für Java ist das Entwicklerkit für die Microsoft Internet Explorer-Umgebung. Es werden Tools, Informationen und Beispiele bereitgestellt, um Ihnen beim Entwickeln von Java-Programmen und -Applets zu helfen, die auf JDK 1.1 und Microsoft Win32 Virtual Machine (Microsoft VM) basieren. Das Microsoft SDK für Java ist nicht mit Microsoft Visual J++ verknüpft.

The Jactivex.exe utility generates classes from a type library but can only be invoked on the command line. This feature is not integrated with the Visual J++ development environment. Unlike the classes generated by the Java Type Library Wizard, you can step into the class wrappers created by the SDK. This is useful for debugging how your code uses the ADO wrapper classes.

This mechanism reads the ADO type library and generates classes that you can instantiate within your application. Diese Klassen werden am folgenden Speicherort generiert: \<windows directory>\Java\trustlib\msado15.

Das Erstellen einer ADO-Anwendung in Java mithilfe des Microsoft SDK für Java ist aus der Perspektive des Quellcodes im Grunde identisch mit dem Verwenden des Java-Typbibliotheks-Assistenten. Beispielcode finden Sie unter ADO-Java-Klassenwrapper. Der einzige echte Unterschied besteht in der Generierung der Wrapperklassen, die in den nachstehenden Schritten gezeigt wird.

So erstellen Sie ein ADO-Projekt mit dem Microsoft SDK für Java

  1. Run the following from a command prompt. You need to set the path to include the Microsoft SDK for Java Bin directory, or run the command from that location. Typically, the Microsoft SDK for Java is installed in the same location as Visual Studio. This is a single command statement.

    
    \<path to DevStudio>\<path to Java SDK>\bin\JactiveX.exe /javatlb "C:\program files\common files\system\ado\msado15.dll" 
    
  2. Run the following command to compile the generated classes. The /g:t switch turns on generation of debug symbols so that you can trace into the .Java symbols. Remove it for release builds.

    
    jvc /g:t c:\<windows>\Java\trustlib\msado15\*.Java 
    
  3. To use these files, open your project in Visual J++. From the Project menu, choose Add To Project. Select Files, and add all of the .JAVA files generated in the trustlib\msado15 directory to your project.