# Is jvm.options file ignored if ES\_JAVA\_OPTS is set?

**URL:** <https://discuss.elastic.co/t/is-jvm-options-file-ignored-if-es-java-opts-is-set/181069>\
**Category:** Elasticsearch\
**Created:** [May 14, 2019, 8:29pm UTC](https://discuss.elastic.co/t/is-jvm-options-file-ignored-if-es-java-opts-is-set/181069 "2019-05-14T20:29:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![riches](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@riches](https://discuss.elastic.co/u/riches)\
**Post date:** [May 14, 2019, 8:29pm UTC](https://discuss.elastic.co/t/is-jvm-options-file-ignored-if-es-java-opts-is-set/181069/1 "2019-05-14T20:29:48Z")

</div>

1. "supporting setting JVM options via the `jvm.options` file or the environment variable `ES_JAVA_OPTS`"

- Does elasticsearch merge settings from both sources?

1. We set java options in jvm.options and JAVA\_OPTS. When I run jinfo -flgas and jconsole, only the settings set in JAVA\_OPTS are displayed as VM parameter. Elasticsearch runs in Windows server.  
Do I have to choose one of them?

2. Are all the settings in JAVA\_OPTS ignored unless they are set in ES\_JAVA\_OPTS even if I start Elasticsearch by running a new process of "java\_home/bin/java JAVA\_OPS ES\_PARAMS org.elasticsearch.bootstrap.Elasticsearch -cp ES\_CLASS\_PATH" ?

---

<div class="post-metadata">

**Author:** ![riches](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@riches](https://discuss.elastic.co/u/riches)\
**Post date:** [May 23, 2019, 5:12pm UTC](https://discuss.elastic.co/t/is-jvm-options-file-ignored-if-es-java-opts-is-set/181069/2 "2019-05-23T17:12:45Z")

</div>

By looking at bin/elasticsearch source file, I realize jvm options from jvm.options and ES\_JAVA\_OPTS are merged. Thanks!

---

<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:** [June 20, 2019, 5:12pm UTC](https://discuss.elastic.co/t/is-jvm-options-file-ignored-if-es-java-opts-is-set/181069/3 "2019-06-20T17:12:46Z")

</div>

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