void (String[] args) { Runnable r = () -> { String frames = StackWalker.getInstance(StackWalker.Option.SHOW_HIDDEN_FRAMES) .walk(s -> s.map(sf -> "\\tat " + sf.toStackTraceElement() + "\\n").collect(Collectors.joining())); System.out.println(frames); }; r.run(); }