JView Sample

This sample is located in \Samples\Native\JView.

Note   To use this sample, it is recommended that you have Microsoft® Visual C++® version 5.0 or higher installed.

Description
Using the Sample
Key Project Files
Technologies Demonstrated

Description

This sample shows how JView.exe creates an instance of the Microsoft virtual machine (Microsoft VM), uses command-line parameters, and starts the specified Java application. The C code included here uses the exposed Microsoft VM Raw Native Interface (RNI) to create a new instance of the Microsoft VM.

Using the Sample

To compile the sample

Use the following command to build release versions:

nmake CFG="JView - Win32 Release" NO_EXTERNAL_DEPS=1

To run the sample

From the \ReleaseJView directory, run the compiled JView.exe application, specifiying a Java application class name as a parameter.

Key Project Files

javaprop.cpp

This file implements the CEnumResourceJAVAPROPERTY class that parses the command-line parameters. This is essentially a property enumeration interface suitable for use with IJavaExecute2::SetSystemProperties in Jview.cpp.

javaprop.hpp

This file contains the CEnumJAVAPROPERTY class definition.

jview.cpp

This file is the jview front end, including the command-line parsing logic.

jview.h

This file contains the header information for the Jview.cpp code.

makefile

This makefile builds the jview stub.

Jview.rc

This file contains the resources for the executable, such as the version name, and Help information.

resource.h

This standard header file for resources contains flag information.

Technologies Demonstrated

Native Code

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