Microsoft SDK for Java

Scripting Samples

The Microsoft virtual machine (Microsoft VM) makes Java applets scriptable. When a Java applet is running in a browser, such as Microsoft® Internet Explorer, most of the public methods and variables of the applet automatically become available to Microsoft® Visual Basic® Scripting Edition (VBScript) or any other language supporting the Microsoft® ActiveX® scripting protocol. Additionally, COM objects can implement the IDispatch interface to make themselves accessible from high-level languages such as Visual Basic and scripting languages such as JavaScript, VBScript, and Active Server Pages.

For more information, see the following topics:

Controlling an Applet Using Scripting

Integrating Java and COM

The following scripting samples are provided.

Sample Description
Event Location: \Samples\Scripting\Event

Technologies: Scripting, ActiveX

Demonstrates:

  • Handling events from Java applets using scripting.
Organization Tree Location: \Samples\Scripting\orgtree

Technologies: Scripting, ActiveX, AFC

Demonstrates:

  • Controlling an applet through scripting.

  • Hosting a JavaBean in an ActiveX containe.
Java Package Manager Location: \Samples\Packaging\Pkgmgmt

Technologies: Packaging, Java Package Manager (JPM), HTML scripting, security

Demonstrates:

  • Building cabinet files using the Microsoft SDK for Java.

  • Signing cabinet files for use in a Web browser.

  • Generating certificates for signing cabinet files using tools provided by the Microsoft SDK for Java.

  • Using HTML script to run an applet that installs classes into the local computer's package manager.

  • Using JPM to install applications, and signed and unsigned applets.
Script Debugger Location: \Samples\Scripting\Script Debugger

Technologies: Scripting, COM

Demonstrates:

  • How a Java applet can communicate with JScript content on an HTML page.

  • Using a scripting object through its exposed IDispatch interface.
INI Files for Java Code Signing Location: \Samples\Security\sign

Technologies: Security, code signing, scripting

Demonstrates:

  • Using .ini files to sign Java code. Several sample .ini files are provided, showing high, medium, and low permissions.
XML Data Source Object Location: \Samples\Scripting\xmldso

Technologies: Java XML DSO Data Source Provider; JavaScript interface to the XML Java Parser

Demonstrates:

  • Using the XMLDSO applet (provided by the com.ms.xml.dso package) as an XML data provider for the data binding features of Microsoft® Internet Explorer 4.0.

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