Testing Java crashes with the sample application myJavaCrasher
Before you enable your Java application with BugSplat technology, you may want to take a moment to examine the crash reports created with our sample applications.
All the crash reports in the [email protected] account are actual crashes created with one of our sample applications. Crash reports from the application MyJavaCrasher are mixed in with crash reports from Windows applications.
Testing the sample application MyJavaCrasher
Locate the MyJavaCrasher java source file from the zip that you just downloaded. Notice that there is a folder called lib which contains 4 libraries:
You will need to add the lib folder to your
Build the MyJavaCrasher source file and launch it without making any changes. Optionally, you may choose to build MyJavaCrasherConsole,which is a console version of the sample (for server applications).
Many of the buttons on the dialog will cause a crash. When a crash occurs, fill out the requested information and select ‘Send’. You should see a corresponding report within a few seconds on the Crashes page. .
Next, we will change the sample app so that crash reports are sent to your BugSplat account.
In MyJavaCrasher.java search for the following line:
BugSplat.Init("Fred", "MyJavaCrasher", "1.0″);
Make the following changes:
- Modify the database name string Fred so that it matches your BugSplat database name.
- Change the application name MyJavaCrasher to a name of your choice (this is an arbitrary string, used to distinguish your applications across crash reports).
- Change the version from "1.0" to a string of your choice. Again, this is arbitrary, but would typically match the version and build string of your application.
- Compile the MyJavaCrasher source file.
Next, launch MyJavaCrasher and select a crash button. Fill in the requested information in the crash dialog and select Send Report
BugSplat Crash Dialog