# LS 5.2: how to set different java for logstash process, installed by system-install?

**URL:** https://discuss.elastic.co/t/ls-5-2-how-to-set-different-java-for-logstash-process-installed-by-system-install/76179
**Category:** Logstash
**Created:** [February 23, 2017, 9:13am UTC](https://discuss.elastic.co/t/ls-5-2-how-to-set-different-java-for-logstash-process-installed-by-system-install/76179 "2017-02-23T09:13:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)
#### Post date: [February 23, 2017, 9:13am UTC](https://discuss.elastic.co/t/ls-5-2-how-to-set-different-java-for-logstash-process-installed-by-system-install/76179/1 "2017-02-23T09:13:09Z")

</div>

Hi,

I am installing logstash from the tar. To install it as service I use the script $LS\_HOME/bin/system-install

I changed the service name on $LS\_HOME/config/startup.options, which works fine.  
Additionally I would like to link to a dedicated java version.  
So I changed the following parameter:

```
# Override Java location
JAVACMD=/usr/local/elk/java/current_jre8_x64/bin/java

```

The service is not starting, because there is currently no /usr/bin/java existing.  
Ok, I could create a link there, then it works. But looks for me as if JAVA\_CMD has no effect.

Also changing the pre running script in startup.options to

```
read -r -d '' PRESTART << EOM
export JAVA_HOME=/usr/local/elk/java/current_jre8_x64
EOM

```

did not help.

What exactly is the problem?

Thanks, Andreas

---

<div class="post-metadata">

### Author: ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)
#### Post date: [February 23, 2017, 5:50pm UTC](https://discuss.elastic.co/t/ls-5-2-how-to-set-different-java-for-logstash-process-installed-by-system-install/76179/2 "2017-02-23T17:50:47Z")

</div>

You might be running into [https://github.com/elastic/logstash/issues/6482](https://github.com/elastic/logstash/issues/6482), which is fixed in [https://github.com/elastic/logstash/pull/6660](https://github.com/elastic/logstash/pull/6660) (which will not be released until 5.3).

Which OS are you using?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 23, 2017, 5:51pm UTC](https://discuss.elastic.co/t/ls-5-2-how-to-set-different-java-for-logstash-process-installed-by-system-install/76179/3 "2017-03-23T17:51:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
