Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Thread.currentThread().getStackTrace() problem

Status
Not open for further replies.

ptxyz

Programmer
Joined
Oct 22, 2007
Messages
4
Location
US
Hi All.

I've used the following for debug purposes in Java 1.5:
Code:
System.out.println(Thread.currentThread().getStackTrace()[2].toString());

While trying to compile the same code in Java 6 I'm getting the following error:

Code:
1. ERROR in IAutoUtils.java (at line 116)
       System.out.println(Thread.currentThread().getStackTrace()[2].toString());
                                                  ^^^^^^^^^^^^^
The method getStackTrace() is undefined for the type Thread

Any ideas / suggestions are appreciated.

Thanks,
-Pavel
 
Resolved. My PATH has been incorrectly set and I was using the default Ubuntu javac version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top