Solved

How do I show complete java exception trace, not "... 5 more"

Posted on 2007-03-26
3
352 Views
Last Modified: 2013-11-23
I'm debugging a java class (from SourceForge) from the command line.  With some input files, it throws an exception and prints a bunch of trace information -- but not all it has.  It terminates with "... 5 more".

this addresses the issue
http://forum.java.sun.com/thread.jspa?threadID=657351&messageID=3862741

But is there a way to get the java runtime to print the entire trace rather than truncating it?

Thanks!
0
Comment
Question by:Daniel Wilson
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
mayankeagle earned 250 total points
ID: 18794750
Try calling getStackTrace () and print it yourself:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Throwable.html#getStackTrace()

Otherwise try printStackTrace ( out ) ; and write it to a file, see if it helps.
0
 
LVL 6

Expert Comment

by:SamsonChung
ID: 18794757
do the following in console

java classname >exception.txt
less exception.txt
0
 
LVL 6

Expert Comment

by:SamsonChung
ID: 18794759
Or if you are in Windows,

java clasname >exception.txt
notepad exception.txt
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now