Assuming you are running an application from Eclipse, but inside a Java EE container such as Glassfish or Tomcat, calling the printStackTrace () method of the exception object (when caught) displays the stack trace in the console window in Eclipse. In your case, you first need to know if an exception is raised at all. I would not recommend creating an Exception object at runtime to pop a stack out of it.
, , , , log4j, jul slf4j, .
, ( ), .