This question seems to come up
alot.
You can get a look at the complete calling stack if using
Java 1.4 with the getStackTrace() method in java.lang.Throwable.
Using the array of StackTraceElements returned you can get the class, method and line number. In earlier versions of Java you have to roll-your-own equivalent by capturing the output of printStackTrace()
Bill