File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

System.out.println()

 
Paul Keohan
Ranch Hand
Posts: 411
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jar file which contains several classes that have contained in them. This code is 'attached' to another far bigger application which runs a Swing GUI but doesn't have a DOS window. Is it possible that having these System.out.printlns could cause a problem when they are reached - because there's nowhere to write to. At least nowhere that I can see.
I don't have any way of making the GUI application launch a DOS window.
Thanks.
Paul
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, these are not a problem; the Swing GUI is probably running by invoking javaw instead of java (the latter has a command prompt, the former does not), and I've never had any problems with my printlns.
 
Loren Rosen
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could also redirect System.out to a file or to a Swing window using System.setOut()
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
In your case i would use a logging framework like log4j or logkit (based on log4j) there you can
easily set up logging into a file.
(You see log4j in all App Servers and most of the tools)
It is a jakarta framework which you can findhere
There you can write to so called appenders (console, syslogd, file etc.)
Olli
[ June 06, 2003: Message edited by: Oliver Refle ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic