Solved

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

Posted on 2007-03-26
3
356 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:
Mayank S 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

770 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