Refine your search:

I am having trouble compiling the sample search program at http://code.google.com/p/splunk-java-sdk/. Seems like splunk2.jar is compiled with 1.6 and my java is 1.5. Is there a 1.5 splunk.jar somewhere? I don’t see it on the download site.

compile:

[javac] Compiling 1 source file to C:\test\build\classes

[javac] C:\test\src\java\com...\SplunkClientTest.java:5: cannot access com.splunk.sdk4x.SplunkClient 

[javac] bad class file: C:\test\lib\splunk2.jar(com/splunk/sdk4x/SplunkClient.class) [javac] class file has wrong version 50.0, should be 49.0 

[javac] Please remove or make sure it appears in the correct subdirectory of the classpath. 

[javac] import com.splunk.sdk4x.SplunkClient; 

[javac] ^ 

[javac] 1 error

BUILD FAILED C:\test\build.xml:78: Compile failed; see the compiler error output for details.

asked 05 Feb '10, 07:57

hulahoop's gravatar image

hulahoop ♦
2.5k3240
accept rate: 40%


4 Answers:

Thank you for your interest in Java SDK. Unfortunately we don't have a build for 1.5 SDK yet, but we will make sure the next release is compatible with it. Meanwhile you can checkout the code from the svn repository and build the jar file with the SDK you're currently using.

link

answered 05 Feb '10, 23:57

Leo's gravatar image

Leo ♦
817111
accept rate: 47%

Note that Java 1.5 JDK/SDK (aka Java SE 5.0) reached end-of-life in November of 2009, and 1.6 has been available and supported for at least two or three years on most Operating system and J2EE application servers. It might not be a terrible idea to update to 1.6 for new code.

link

answered 06 Feb '10, 03:32

gkanapathy's gravatar image

gkanapathy ♦
26.3k1622
accept rate: 42%

The Java SDK is now available on GitHub. You can find it here: https://github.com/splunk/splunk-sdk-java

You can learn more about it here at: http://dev.splunk.com/view/java-sdk/SP-CAAAECN

link

answered 04 Jan, 13:30

psanford_splunk's gravatar image

psanford_splunk
1792
accept rate: 8%

We are currently building out a new Java SDK with Java 1.6. It will be available on GitHub. I can give pre-release access - just need a GitHub ID.

Any questions - psanford@splunk.com or ping us on Twitter: @splunkdev

link

answered 28 Sep '11, 10:07

psanford_splunk's gravatar image

psanford_splunk
1792
accept rate: 8%

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:

×221
×32
×23

Asked: 05 Feb '10, 07:57

Seen: 1,391 times

Last updated: 04 Jan, 13:30

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