Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

supressing the dos box

 
wes blue
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to supress the dos box when running an window application.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic