aspose file tools*
The moose likes Beginning Java and the fly likes how to peep a java file with multiple error lines page by page in DOS?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to peep a java file with multiple error lines page by page in DOS??" Watch "how to peep a java file with multiple error lines page by page in DOS??" New topic
Author

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

wliu807
Greenhorn

Joined: Feb 19, 2002
Posts: 2
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

Joined: Nov 28, 2001
Posts: 233
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 ]

Sharing is learning
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
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

Joined: Feb 20, 2002
Posts: 6
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

Joined: Sep 29, 2000
Posts: 8521
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

Joined: Jan 23, 2002
Posts: 144
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.


For a good Prime, call:<br />29819592777931214269172453467810429868925511217482600306406141434158089
Steve Deadsea
Ranch Hand

Joined: Dec 03, 2001
Posts: 125
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

Joined: Sep 29, 2000
Posts: 8521
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
 
jQuery in Action, 2nd edition
 
subject: how to peep a java file with multiple error lines page by page in DOS??