Try this:public static void main(String[]args){ try{ // your code here } catch(Exceptione){ e.printStackTrace(); }}That way any exceptions whichmake it out to themain() method will be caught and a stack trace will beproduced.