Security

Can JAVA_HOME be set in splunk-launch.conf?

adriannicolicea
New Member

If you have an app/add-on running on Splunk that doesn't have the set JAVA_HOME path option, can you somehow manage to tweak the whole Splunk installation to look for it in a different directory than the system's default one?

I was thinking it may be possible to add a new line in splunk-launch.conf like JAVA_HOME=/path/
If this is possible, will this force the app/add-on to look for it where the launch.conf file points to?

0 Karma
1 Solution

chrisyounger
SplunkTrust
SplunkTrust

Yes that should work fine.

View solution in original post

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Yes that should work fine.

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

I just tested setting JAVA_HOME in splunklaunch of my personal environment and it works as expected

0 Karma

adriannicolicea
New Member

How did you perform the test?

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

I edited splunk-launch.conf to have the following contents:

SPLUNK_SERVER_NAME=Splunkd
JAVA_HOME=/opt/java
# Splunkweb daemon name
SPLUNK_WEB_NAME=splunkweb

I then restarted splunk. And I made splunk run a script ran the env command.

0 Karma

adriannicolicea
New Member

Thank you!

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

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