I want to determine the class name where my application started, the one with the main() method, at runtime, but I\'m in another thread and my stacktrace doesn\'t go all the
Try using Thread.getAllStackTraces(). It returns a Map of the stack traces from all running threads, not just the current one.