Getting Splunk DB Connect to work with OpenJDK

So while installing Splunk DB connect I ran into an issue where it would return: "The specified JAVA_HOME is invalid: Unable to determine Java version: openjdk version "1.7.0_25" OpenJDK Runtime Environment (build 1.7.0_25-b15) OpenJDK 64-Bit Server VM (build 23.21-b01, mixed mode)"

We run OpenJDK in our shop, and to fix this I had to edit the init file for the Splunk DB Connect Plugin.

What I did was edit the file $SPLUNK_HOME/etc/apps/dbx/bin/spp/java/__init__.py Line 92:

m = re.search("java version \"?([^\s\"]+)\"?", output, flags=re.MULTILINE)

To:

m = re.search("openjdk version \"?([^\s\"]+)\"?", output, flags=re.MULTILINE)

I was then able to proceed.

Hope this helps!