BugSplat Documents

Java java_crashreporting_bugsplat_small

Crash reporting from BugSplat makes it simple to track and analyze the crashes experienced by your users.

Use the crash data collected by BugSplat to prioritize fixes, track defects, and understand the stability of your software.

To learn more about BugSplat sign up for a free trial.


Before doing anything make sure to log in using your email address and downloadthe BugSplat software development kit for Java Applications.

To get a feel for the BugSplat service before enabling your application, feel free to experiment with the MyJavaCrasher sample application, which is part of the BugSplat software development kit that can be downloaded by registered users.

Integrate BugSplat crash reporting with your Java Applications:

  • Add BugSplat to your application as follows:
    1. Add the BugSplat library to your CLASSPATH.
    2. Import the BugSplat exception handler class com.bugsplat.client.BugSplat.
    3. Add a call to BugSplat.Init as shown in the MyJavaCrasher sample code.
  • The initialization call requires three parameters: BugSplat database, application name and version. You supply the application name and version. The BugSplat database is created and selected on the Versions page. Typically, you will create a new database for each major release of your product.
    • Add a try-catch block in your application entry point (for example, in main).
    • To handle both runtime Exceptions and Errors, catch Throwable, construct an Exception object, and pass it to BugSplat.HandleException.
  • If your application creates threads, you will want an exception report to be generated before the thread is terminated:
    • class MyThreadGroup extends ThreadGroup { public MyThreadGroup (String s) { super(s); } public void uncaughtException(Thread thread, Throwable throwable) { BugSplat.HandleException(new Exception(throwable)); } }
    • Construct an instance of your ThreadGroup class.
    • Construct an instance of your Thread, providing your ThreadGroup instance in the constructor.
    • Start the thread.
  • Remember to test your application by forcing a crash and verifying that crashes are posted and a good call stack is created.