The information in this article applies to:
SUMMARYWhen you run a Java Application using Jview.exe from within the Developer Studio IDE, the MS-DOS Command Prompt Window closes immediately after the Java Application terminates. This article illustrates how to programmatically prevent the MS-DOS Window from closing immediately. MORE INFORMATION
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:
or alternatively:
This code causes the Command Prompt window to remain open until you press the enter key. This is a useful because you can see the output during the development of your Java application. A second option is to run your Java application externally, that is outside of the Developer Studio environment. Open up a DOS command session, and navigate to your project directory. After building the project in the Developer Studio, switch to the DOS window and run Jview.exe with class file containing main as the argument to JView:
Another way of preventing the DOS Window from closing while running the application from within Developer Studio (Visual J++):
REFERENCESFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java,
please see the following pages on the Microsoft Technical Support site: http://support.microsoft.com/support/visualj/ Additional query words:
Keywords : kbVJ100 kbVJ110 |
Last Reviewed: November 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |