Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

runtime errors scrolling up in dos window

  Asked By: Brooklyn    Date: Jul 08    Category: Java    Views: 1018
  

When some runtime error is coming in my program, sometimes
there are so many lines in it, that it keeps on scrolling
and disappears from the top edge of window.

I am not able to the the first line of error message which
would have given me the line no. where the exception really
occurred.

Share: 

 

8 Answers Found

 
Answer #1    Answered By: Arnelle Schmidt     Answered On: Jul 08

You could use an IDE, as far as I know Sun One Studio
and Eclipse are free and work to a degree (at least)
thae latter, like the expensive IDE:s like JBuilder.
If you want a "DOS-feel-alike" IDE I can recommend
Kawa (KawaPro?) where you just compile the source
files directly instead of having to go through
creating a project (great for small apps like
applets), I don't believe that it's free though.

 
Answer #2    Answered By: Cleopatra Massri     Answered On: Jul 08

I wouldn't recommend Kawa to anybody. It isn't maintained by anybody,
and doesn't support stuff since 1.3.*. University of Queensland uses
Kawa to teach Java with, and it is a totaly horrible experiance for new
coders. They would be better off with UltraEdit. At least until they
change to teaching Scheme :(

If you want to buy a really nice IDE that isn't too expensive get
IntelliJ IDEA from Jetbrains. It is pretty much as fully featured as
most programmers can want, and it only costs US$100.

Netbeans (Sun One Studio) and Eclipse are ok. Netbeans is trying really
hard to be as good as either Eclipse and IntelliJ but not quite getting
there (at least in my opinion). Eclipse is (at least to me) kind of
weird compared to IntelliJ.

Of course this is totally biased ... I really like IntelliJ IDEA, I used
to use Eclipse and Netbeans but I didn't really like either. IDEA is
like programming with someone else to help you :)

 
Answer #3    Answered By: Muntasir Bashara     Answered On: Jul 08

> soln 1 : redirect the output to a file
>
> java your_error_prone_program > out.txt

I think error  messages don't go to file like that.

Ages ago I have used some method of redirecting errors  to a
different file. It was some prefix of ">". 1> e> &2> or
something I have forgotten.

Is there any such method?

> soln 2 : install cygwin so you can do a pipe
>
> java your_error_prone_program | more

what is cygwin? where?
ok. shall search.

> soln 4 : use eclipse
>

that is too huge a download.

> soln 5 : catch runtime  exceptions ;)

only if I know where they are occurring.

 
Answer #4    Answered By: Cadencia Bernard     Answered On: Jul 08

> $ javac MyFaultyProgram > error_log

what about

d:\mydir> javac mtfaultyprogram

>>how to solve this problem.
>
>
> Control your errors  better.

of course. but here even 99.99% control is not good enough

 
Answer #5    Answered By: Patty Freeman     Answered On: Jul 08

soln 1 : redirect the output to a file

java your_error_prone_program > out.txt

soln 2 : install cygwin so you can do a pipe

java your_error_prone_program | more

soln 3 : switch to linux

soln 4 : use eclipse

soln 5 : catch runtime  exceptions ;)

 
Answer #6    Answered By: Johnathan Nelson     Answered On: Jul 08

You could also try using Log4j for your errors  and stop using System.out. It
might not be what you're looking for but it's faster than command line  printing
and has many features. Take a look at http://logging.apache.org/

 
Answer #7    Answered By: Horia Ahmed     Answered On: Jul 08

> I am not able to the the first line  of error  message which
> would have given me the line no. where the exception  really
> occurred.

$ javac MyFaultyProgram > error_log


> how to solve this problem.

Control your errors  better.

 
Answer #8    Answered By: Sophie Williamson     Answered On: Jul 08

If you are using windows command prompt windows, then you can increase
the buffer size (height) of the window. You can do this as follows.
Bring focus to the cmd, press alt+'space bar', Select the properties
and then increase the screen buffer height to whatever you like.

 
Didn't find what you were looking for? Find more on runtime errors scrolling up in dos window Or get search suggestion and latest updates.




Tagged: