title: Optional printing of stack trace in Java
body: <p>I am creating a java application in which there is a possibility that exceptions might be thrown. I am handling these exceptions in a try-catch block and printing appropriate messages so that the business users don't have to see the ugly stack trace in case of a failure.</p>
  
  <p>But now when I debug, I would like to invoke the JAR file in such a way that it will print the stack traces for me, so that I can know where exactly the problem lies.</p>
  
  <p>Can someone enlighten me on how this can be achieved?</p>