• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dos output

 
Forrest Xu
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When I run java executable file in Windows, A DOS output windows will pop up. Can we RUN java executable file without DOS output windows by adding some configuration?
Thanks
 
Greg Charles
Sheriff
Posts: 2987
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use javaw instead of java to run the application.
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An other approch is redirect the output to a file.
Example : java TestProgram >> out.txt
Here the output will be printed in out.txt file.
One useful thing about this approch is it will be useful to trace in case of exceptions.
-arun
 
Mike
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arun Boraiah:
An other approch is redirect the output to a file.
Example : java TestProgram >> out.txt
Here the output will be printed in out.txt file.
One useful thing about this approch is it will be useful to trace in case of exceptions.
-arun

I don't understand the purpose of the javaw command. IT DOESN'T GIVE OUTPUT!!!
My questions is, what is the purpose of javaw?
Thanks
M.S.
 
Martin Clifford
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your program is supposed to give output to the console window (DOS Prompt, et al.), then use Java to start the program. If it's a GUI application, then you can use Java or Javaw to start the program.
At least as far as I'm aware.
 
Dirk Schreckmann
Sheriff
Posts: 7023
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic