Microsoft SDK for Java

Windows Samples

The Microsoft SDK for Java provides features that support the integration of Java with Windows. These samples demonstrate some of ways in which Java can be integrated with Windows, including using Windows APIs from Java, using Win32 resource files, and implementing a Microsoft® Windows NT® service in Java.

The following Windows samples are provided:

Sample Description
Cryptography Location: \Samples\Windows\Crypto

Technologies: Windows, J/Direct

Demonstrates:

  • Using the Windows Cryptography API from Java.

  • Importing Win32 API functions that use Windows error codes and mapping these to Java methods that throw com.ms.dll.Win32Exceptions.

  • Creating a custom input and output stream class.
Win32 Resource Loading Location: \Samples\Windows\Win32ResSupport

Technologies: Windows, AFC, internationalization, packaging

Demonstrates:

  • Using the supported Microsoft® Win32® resource styles and controls included with the Win32ResourceDecoder class in the com.ms.ui.resource package,

  • Using Win32 resource (.res) files to develop multilingual applications.

  • Using the resmerge tool to combine multiple Win32 resource files into a single file.
Java and Tables Location: \Samples\ASP

Technologies: ASP, Windows, J/Direct

Demonstrates:

  • Creating an HTML table based on attributes set by the caller.
NT Service Location: \Samples\Com\NTService

Technologies: COM, Windows, native code, J/Direct

Demonstrates:

  • Building a Microsoft Windows NT service using only Java, and implementing the Service Main and Service Control as Java classes.

  • Using the Windows NT Event Log with a custom message file.
TBarIcon Location: \Samples\JDirect\tbaricon

Technologies: J/Direct, Windows

Demonstrates:

  • Using mouse events and callback classes.

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