Jview.exe (jview) is a tool used to execute Java applications from the command line. Jview provides an environment in which your application can run. It supports both debug and retail versions of your application.
Jview currently does not support pure Java applets. If your Java project has a main method, then jview will execute it. This includes all Java applications. For an alphabetic reference to the jview options see Reference to Jview Command-Line Options.
The Jview.exe (jview) command line uses the following syntax.
jview [options] <classname> [arguments]
The following table describes input to the jview command.
|options||One or more jview options. See Reference to Jview Command-Line Options for more information.|
|classname||The name of the .class file to execute. Do not include the .class extension to this filename. For example, use HelloWorldApp and not HelloWorldApp.class.|
|arguments||Command-line arguments to be passed to the .class file supplied in classname parameter.|
Note Any options that you want to supply to jview must be supplied before the name of the .class file or they will be interpreted as command-line arguments to the .class file.
You can specify Jview.exe (jview) options on the command line. If you are executing your Java application from the command line, enter the options you want to supply to jview before the name of your .class file on the command line.
Note Jview will run only Java applications. To use jview for executing your application, your class must contain a main method. If your program is an applet, run it from a browser.
This topic is an alphabetic reference to all the jview command-line options. If a command-line option can take one or more arguments, its syntax is shown before its description. Click any option in the following table for information on the option.
Use the /cp option to set the CLASSPATH environment variable for the current compilation. Using this option specifies the path where the jvc or jview command-line tools can find system and user-defined classes. The Java interpreter uses a platform-dependent default location and the CLASSPATH environment variable to find system classes. See CLASSPATH Environment Variable for more information. The directories in the class path are separated by semicolons on a Microsoft® Windows® system; by colons on UNIX.
For example, on Windows NT®, the class path might be:jview /cp x:.;x:\java\classes
In this example, jview searches in and beneath the directories on the path for system and user-defined classes.
Appends the path entered to the end of the CLASSPATH environment variable and inserts a semicolon between them.
For a full description of the CLASSPATH environment variable, see CLASSPATH Environment Variable.
Note The value for the class path can come from the CLASSPATH environment variable or from the /cp option. When multiple /cp:a switches are entered, the paths are concatenated.
The following command concatenates the directories, myproj1 and myproj2, and appends the resulting path to the end of the existing class path.jview /cp:a myproj1 /cp:a myproj2
This option is inserted before the path entered to the CLASSPATH and inserts a semicolon between them. When multiple /cp:p switches are entered, the paths are concatenated.
Note The value for the class path can come from the CLASSPATH environment variable or from the /cp option. See CLASSPATH Environment Variable for more information.
The following command concatenates the directories, myproj1 and myproj2, and is inserted before the resulting path to the existing class path.jview /cp:p myproj1/cp:p myproj2
Use the /v option to cause jview to verify all invoked methods. Without this option, only methods from untrusted loaders are verified. Verification is a process applied to the byte code loaded from the class files to ensure that it does not pose a security threat. For remotely loaded class files, the Microsoft Win32 VM for Java (Microsoft VM) allows only a subset of the total functionality possible with the byte code language. Verification enforces this so that if your class files attempt to do anything illegal, the class file is rejected.
For performance reasons, local system classes are not normally verified. The /v option forces the verifier to process these. You can use this to ensure that a set of class files will pass the verifier.
Use the /p option to force jview to pause before exiting if an error occurs. You can use this to determine the user interface state just prior to the error when debugging an application.
Use the /d: option to set a system property. System properties can be read using the Java.lang.System.getProperty or Java.lang.System.getProperties methods. See these methods for descriptions of system properties. As an example, you can use the following command line to set the user.dir property to some arbitrary value:jview /d:user.dir=c:\java\test myapp <ex> <p>You can also set user-defined properties. For example, you can set a property called "myprop" with the following command-line <ex>jview /d:myprop=12 myapp
|© 1997 Microsoft Corporation. All rights reserved. Legal Notices.|