• 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

Can I make Win98 Dos Window scrollable?

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unlike Win2000, Win98 doesn't have scroll bar for DOS window. This makes debugging Java run-time error extremely hard. Does anyone has a way out?
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you can set scrollbars in Win98 but you can send the output to a text file instead, and read that in Notepad.
Create your own PrintStream:
> PrintStream yourPrintstream = new Printstream(new FileOutputStream("yourFile.txt"))
and and point System.out to it:
> System.setOut(yourPrintStream)
Then all your System.out.println() calls will be directed there.
Or could set System.err the same way and call System.err.println() for your error displays.
 
Tom Tang
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for the help.
There are many potential run-time error-generating codes in different files inside the project. Is it possible to set the System.err to the text file just once instead of doing it everytime when an error might happen?
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do it in your start up class (the one with the main method) before you initiate everyting else. Use both System.setOut() and System.setErr() to be sure to write everything to the text file.
/Andreas
 
Tom Tang
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for the help. I think another way is just redirect dos prompt to the file directly. Something like
java Myclass > debug.txt
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Create a short cut for your ms-dos prompt on your desktop.
2. Right click on the ms-dos icon.
3. Select properties.
4. Click the layout tab.
5. Set the screen buffer size height to 500
6. Click OK
You should now have a ms-dos prompt with scroll bars and a buffer size of 500.
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic