# Using different jdk

**URL:** <https://discuss.elastic.co/t/using-different-jdk/20026>\
**Category:** Elasticsearch\
**Created:** [October 1, 2014, 1:56pm UTC](https://discuss.elastic.co/t/using-different-jdk/20026 "2014-10-01T13:56:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_O\_Reilly](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Sean\_O\_Reilly](https://discuss.elastic.co/u/Sean_O_Reilly)\
**Post date:** [October 1, 2014, 1:56pm UTC](https://discuss.elastic.co/t/using-different-jdk/20026/1 "2014-10-01T13:56:30Z")

</div>

Hi,

I am using the puppet module from forge and am trying to set $JAVA\_HOME  
within elasticsearch as would like to use oracle jdk rather than openjdk  
just for elasticsearch.

I have added it to init\_defaults but it won't work unless I add a line to  
the init script manually exporting the variable??

has anyone managed to do this?

Regards

Sean.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d9df02c4-f727-4b01-b49e-51c566621441%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d9df02c4-f727-4b01-b49e-51c566621441%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:58am UTC](https://discuss.elastic.co/t/using-different-jdk/20026/2 "2017-07-06T00:58:59Z")

</div>


