Solved

open AWT app - finish/close DOS window

Posted on 1998-05-10
4
201 Views
Last Modified: 2006-11-17
When calling an AWT app from a .bat file, how do you close the resulting DOS window (the cursor is on a new line, but there is no prompt)?
0
Comment
Question by:ptpovo
  • 2
4 Comments
 
LVL 4

Expert Comment

by:rafistern
ID: 1220894
Wouldn't the best thing to be to configure the dos window to close on completion.
0
 

Author Comment

by:ptpovo
ID: 1220895
Absolutely, problem is I can't figure out how that is done.  My first thought is to include the following:

@echo off
java MyAWTApplication
exit

but the DOS window remains open during the life of the AWT app window and after the AWT app window has been closed.  The DOS cursor just hangs with no prompt.
0
 

Accepted Solution

by:
prg022698 earned 50 total points
ID: 1220896
In my case the window closes automatically, don know why yours doesn't (are you sure your app has ended?) on the other hand you can use javaw instead of java to open the app without any DOS window.
0
 

Author Comment

by:ptpovo
ID: 1220897
Tried javaw, works just fine! Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
The viewer will learn how to implement Singleton Design Pattern in Java.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now