Java tutorial
import java.io.FileNotFoundException; import java.io.PrintWriter; public class Main { public static void main(String[] argv) throws FileNotFoundException { Throwable t = new Exception("from java2s.com"); t.setStackTrace(new Exception("java2s.com").getStackTrace()); } }