Getting started with the Splunk SDK for Java

To get started with the Splunk SDK for Java, do the following:

Get the prerequisites

The first thing you have to do is get the SDK, get Splunk Enterprise, and fulfill any other requirements. Then, install the SDK. That's it.

This documentation assumes you are already familiar with Splunk Enterprise. For example, you know how to index data and save a search. To learn more about using Splunk Enterprise, access the following resources:

  • If you want a deeper description of Splunk's features, see the Splunk documentation.
  • For a step-by-step walkthrough of using Splunk Enterprise with some sample data, try the Search Tutorial in the Splunk documentation.
  • The Splunk SDKs are effectively a layer over the Splunk Enterprise REST API. While you don't need to know the REST API to use this SDK, you might find it useful to read the Splunk REST API basics or browse the Splunk REST API Reference.

Try the SDK

Try the SDK out by using the examples and running the unit tests.

You can make things easier by saving your login credentials in the .splunkrc file so you don't have to enter your login info each time you run an example. If you choose to do this, be sure you're using a non-production instance of Splunk Enterprise.

Start coding

When you're ready to start coding, check out the Splunk Developer Application Gallery for inspiration.

You can use different IDEs to develop with Java. We provided project-level support for Eclipse and IntelliJ, and our repository directory structure will work for both of them.

The Splunk plug-in for Eclipse makes developing with the Splunk SDK for Java even easier. For more information, see Overview of the Splunk Plug-in for Eclipse.