• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Java Command-Line Loader\windows\system32\jview.exe; wjview.exe

Run Java programs without using a web browser.

To Open

Command Prompt jview

Command Prompt wjview


jview [options] filename [arguments]
wjview [options] filename [arguments]


Java is a programming language that allows developers to create programs that can run on any platform, including Windows, Unix, and MacOS. Since Java applications (.class files) aren't formal Windows programs, they can't be opened by themselves; rather, you must use the Java Command-Line Loader to run them. The exceptions are so-called Java applets, which are Java programs included in web pages and run internally by your web browser.

Windows XP comes with two Java command-line loaders, jview.exe and wjview.exe. Both versions do the same thing and accept exactly the same parameters (see below). The difference is that jview.exe is a command-line-based program and wjview.exe is a Windows-based program. The Java Command-Line Loader takes the following options:


The full path and filename of the .class file to be executed.


Executes AppletViewer.

/d:< name>=< value>

Defines a system variable to be used by the Java program.

/n < namespace>

The namespace in which to run.


Pauses before terminating if an error occurs.


Verifies the Java program before executing it.


The command-line arguments to be passed onto the Java program.


Prints verbose stack traces (requires debug classes).

/cp classpath

Sets the class path.

/cp:a path

Appends path to the class path.

/cp:p path

Prepends path to the class path.


  • The Java Command-Line Loader uses Microsoft's version of the Java Virtual Machine (JVM), which is very fast, since it uses Just-In-Time compiler technology.

  • Unfortunately, there is not an option or Registry setting that enables Java logging. However, you can redirect the output (see Appendix C) when invoking an application, as in the following example:

    C:\>jview main > javalog.txt

  • When you run a Java application using the Java Command-Line Loader from within the Microsoft Developer Studio IDE, the command prompt window closes immediately after the Java application terminates. To prevent the MS-DOS window from closing immediately, you can have an input statement as the last statement in your Java application.

    For example:

    system.in.read(  );

  • A second option is to run your Java application externally (outside the Developer Studio environment).

  • For the Microsoft SDK containing the latest Java compiler and Virtual Machine for using Java with the WIN32 API only, go to http://www.microsoft.com/java/.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint