Refine your search:

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

asked 05 Jun '12, 14:40

KAjnadkar's gravatar image

KAjnadkar
393
accept rate: 100%

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-javalib 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.

(05 Jun '12, 15:54) KAjnadkar
1

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

(05 Jun '12, 15:57) sdaniels ♦

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.

(05 Jun '12, 16:11) KAjnadkar

One Answer:

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_simple/Program.java

What are you trying to do?

link

answered 05 Jun '12, 15:38

sdaniels's gravatar image

sdaniels ♦
4.5k49
accept rate: 34%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1

Asked: 05 Jun '12, 14:40

Seen: 393 times

Last updated: 05 Jun '12, 16:11

Copyright © 2005-2012 Splunk Inc. All rights reserved.