June 20, 1996
The Microsoft® Java VM is an ActiveX control that allows Microsoft Internet Explorer 3.0 users to run Java applets. The control is installed as a component of Internet Explorer 3.0. The Java VM supports integration between other ActiveX controls and a Java applet. In addition, The Java VM understands the component object model (COM) and is capable of loading COM classes and exposing COM interfaces. This means that you can now write ActiveX controls using Java.
HTML pages use the <APPLET> tag to load a Java class file. (A class file is the output generated by a Java compiler.) The class files are loaded into the VM, verified by the VM, and then executed by the VM. In addition to verification and execution, the VM handles sandboxing, memory management, and the management of other system resources. (All virtual machines accomplish these tasks.)
There is a large amount of existing code not written in Java that would be useful for the Java developer. Just as Java takes advantage of existing operating system routines for displaying windows, or making sounds, Java allows developers to access their own existing bodies of code. For example, a 3-D special effect may have been written in C and hand-tuned to a particular environment. A Java programmer would benefit significantly from using this existing code rather than rewriting it in Java.
To simplify and promote the reuse of existing code, the Microsoft Java VM supports two access methods. The first (and recommended) method is via a COM interface. This allows the VM to make a COM object appear like a Java class, with Java interfaces, and vice versa. In this case, the VM deals with all of the COM issues (such as addref/release) and the COM interfaces. This method is discussed in greater detail in the section "Java & COM Integration" in the Java VM documentation.
The second method supports existing native code (written in C or C++) that requires the lowest level of control. This method allows Java code to call the native code directly. In this case, the developer needs to be aware of garbage collection issues and object layout within the VM. This method is discussed in greater detail in the section "Microsoft VM - Java Native Code Interface Specification" in the Java VM documentation.
Read the Java VM documentation.
© 1996 Microsoft Corporation