• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

System.out.println()

 
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1844
Eclipse IDE Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could also redirect System.out to a file or to a Swing window using System.setOut()
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic