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
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.
To compile the sample
Use one of the following commands to build an executable:
For building Jview.exe
nmake CFG="JView"
For building WJView.exe
nmake CFG="WJView"
For building AppletViewer.exe
nmake CFG="AppletViewer"
For building PJView.exe
nmake CFG="PJView"
For building PWJView.exe
nmake CFG="PWJView"
Information on Jview.exe, WJView.exe and AppletViewer.exe can be found in the SDK for Java documentation. PJView.exe and PWJView.exe are used in Samples\Profiler\Jviewprf.
To run the sample
From the \Samples\Native\JView directory the following can be run:
Jview - run the compiled JView.exe application, specifying a Java application class name as a parameter.
WJView - run the compiled WJView.exe application, specifying a Java application class name as a parameter.
AppletViewer - run the compiled AppletViewer.exe application, specifying a HTML file or URL as a parameter.
PJView - run the compiled PJView.exe application, specifying a Java application class name as a parameter.
PWJView - run the compiled PWJView.exe application, specifying a Java application class name as a parameter.
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.hppThis file contains the CEnumJAVAPROPERTY class definition.
jview.cppThis file is the jview front end, including the command-line parsing logic.
jview.hThis file contains the header information for the Jview.cpp code.
makefileThis makefile builds the jview stub.
Jview.rcThis file contains the resources for the executable, such as the version name, and Help information.
resource.hThis standard header file for resources contains flag information.