Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to peep a java file with multiple error lines page by page in DOS??

 
wliu807
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i try to compile a java file which creats multiple error lines. how can i peep those error lines page by page in DOS environment? i mean what command i should use?
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
redirect the out put to a file . approch is like this
javac file.java > somefilename
after excution out put will be written to 'somefilename' open this file to read.
Might be better way.
-arun
[ February 20, 2002: Message edited by: Arun Boraiah ]
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wliu807
This is the second time I am asking you to please change your display name to adhere to our naming policy.
I look forward to you cooperation,
thanks
Dave
 
david liu
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Arun again!
well, this time your solution donest seem to work. i use the command "javac filename.java > anotherfilename", but there is nothing(blank) in "anotherfilename" which appears in the same directory as filename.java. i suppose this command might be only appiled in unix enviroment, not in DOS.
any other idea about this problem?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have your display options in Windows for the DOS Prompt set to window instead of full screen? If so you should have scroll bars to go back with.
Right click on the link or icon that you are using to invoke the DOS window and check your properties.
 
Greg Brouelette
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In windows NT and 2000 you can set the buffer size of your DOS window (I use 4000 lines). This gives you a scroll bar that you can use to scroll back up to see your messages.
Right click the upper left DOS window icon and select "properties". Then select the Layout tab. In the buffer "height" window put 4000.
If you're in Windows 95/98/xp/me/whatever then you're outta luck and have to redirect your output every time.
You've just put your finger on exactly the reason why I won't develop Java code in Windows 98. I only use Win 2k and Linux for development. 98 is my game OS. This is one of the reasons why.
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need to redirect the error stream from your file.
javac file.java 2> somefilename
Compile errors are on System.err not System.out.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a conversation about redirecting System.err with 2>
http://www.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=33&t=002795
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic