In case of CentOS 6.6 with java-1.8.0-openjdk package, correct directory to Java that worked with Splunk was
/usr/lib/jvm/jre-1.8.0 .
More info: I first used /usr/lib/jvm/jre (DO NOT use it), but then the following started to appear in dbx2.log:
[CRITICAL] [rpcstart.py] RPC server has been terminated abnormally with error [Exception in thread "main" java.lang.UnsupportedClassVersionError: com/splunk/dbx2/rpc/RPCServer : unsupported major.minor version 52.0].
It turned out that default Java version for CentOS is Java 7, and the DBConnect 2 was compiled for Java 8.
... View more