All Apps and Add-ons

Splunk JAR file

KAjnadkar
Explorer

Can someone please tell me what do I need to import in netbeans to get my java application to talk to Splunk?

Tags (2)
0 Karma
1 Solution

sdaniels
Splunk Employee
Splunk Employee

There are examples for the Java SDK on github in the examples folder.

https://github.com/splunk/splunk-sdk-java

Here's a simple search example and you'll see the classes used. There are many different examples to reference.

https://github.com/splunk/splunk-sdk-java/blob/master/examples/search_simple/com/splunk/sdk/search_s...

What are you trying to do?

View solution in original post

0 Karma

KAjnadkar
Explorer

Thank you very much. I found them.
The problem is, in the tutorial, it asks to do an ANT CLEAN. I think it may have something to do with the missing Jars.
Anyway, thank you again.
See you around.

0 Karma

sdaniels
Splunk Employee
Splunk Employee

splunk.jar is all that you need. When you build the Java SDK you'll find the .jar in /splunk-sdk-java/dist/

KAjnadkar
Explorer

I am sorry.
I am new to Splunk.
I just need to know what Jar file can I include in the library in netbeans that will make "import com.splunk.;" error go away.
I included all the jar files that appear in Splunk-sdk-java\lib\ in my netbeans project after ANTing as per instructions, but it still cannot resolve the import com.Splunk.

I am trying to write a simple program that will talk to local Splunk.

Any help is appreciated.

0 Karma

sdaniels
Splunk Employee
Splunk Employee

There are examples for the Java SDK on github in the examples folder.

https://github.com/splunk/splunk-sdk-java

Here's a simple search example and you'll see the classes used. There are many different examples to reference.

https://github.com/splunk/splunk-sdk-java/blob/master/examples/search_simple/com/splunk/sdk/search_s...

What are you trying to do?

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...