File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes supressing the dos box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "supressing the dos box" Watch "supressing the dos box" New topic

supressing the dos box

wes blue

Joined: Apr 27, 2002
Posts: 1
Is there a way to supress the dos box when running an window application.
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
try using javaw instead of java.
From java - the Java application launcher

The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.

[Blog] [Blogroll] [My Reviews] My Linked In
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Another approach that you may want to consider, would be to package the application in a jar file that the user could just double-click in order to execute the program. No dos prompt appears.
Take a look at this brief tutorial to learn how to make such a jar file.
Good Luck.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: supressing the dos box
It's not a secret anymore!