Searchโ€ฆ
Java

Introduction

Before integrating a new BugSplat SDK with your application, make sure to review the Getting Started resources and complete the simple startup tasks listed below.
    โ€‹Sign up for a BugSplat account
    โ€‹Log in using your email address
    Create a new database for your application
Need any further help? Check out the full BugSplat documentation here, or email the team at [email protected].

Overview

Integrate BugSplat crash reporting with your Java Applications:
Before doing anything make sure to download the BugSplat software development kit for Java Applications.

Add BugSplat to your application

Add the BugSplat pbrary to your CLASSPATH.
Import the BugSplat exception handler class com.bugsplat.cpent.BugSplat.
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:
1
class MyThreadGroup extends ThreadGroup {
2
public MyThreadGroup (String s) {
3
super(s);
4
}
5
6
public void uncaughtException(Thread thread, Throwable throwable) {
7
BugSplat.HandleException(new Exception(throwable));
8
}
9
}
Copied!
Construct an instance of your ThreadGroup class.
Construct an instance of your Thread, providing your ThreadGroup instance in the constructor.
Once that is complete start the thread.

Test

Remember to test your with our the MyJavaCrasher sample application. This will test that crashes are posted and a good call stack is being created.
Last modified 1mo ago