# Why elasticsearch has separate JNA library

**URL:** <https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986>\
**Category:** Elasticsearch\
**Created:** [August 13, 2019, 8:48am UTC](https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986 "2019-08-13T08:48:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hirik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hirik/32/45032_2.png) [@Hirik](https://discuss.elastic.co/u/Hirik)\
**Post date:** [August 13, 2019, 8:48am UTC](https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986/1 "2019-08-13T08:48:59Z")

</div>

Hi,

Why do we maintain separate JNA library for elasticsearch?  
Found this repo in maven dependency: [https://mvnrepository.com/artifact/org.elasticsearch/jna](https://mvnrepository.com/artifact/org.elasticsearch/jna)

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 13, 2019, 9:13am UTC](https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986/2 "2019-08-13T09:13:59Z")

</div>

See [https://github.com/elastic/jna-build](https://github.com/elastic/jna-build) - support for some platforms has been removed.

---

<div class="post-metadata">

**Author:** ![Hirik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hirik/32/45032_2.png) [@Hirik](https://discuss.elastic.co/u/Hirik)\
**Post date:** [August 14, 2019, 10:27am UTC](https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986/3 "2019-08-14T10:27:32Z")

</div>

Hi,

Thanks for the help!

There's a need to use the Original JNA library for my project. What are the problems that are most likely to come up if I use the default JNA library?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [August 14, 2019, 10:00pm UTC](https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986/4 "2019-08-14T22:00:54Z")

</div>

The primary motivation to create our own build of JNA was inconsistency in the compatibility of artifacts produced by the JNA project. By building our own, we ensure that the operating systems we support are all supported, regardless of which random (!) OS/system built the artifacts for a JNA release. Using the original JNA might work, but it is not supported, and doing so would mean replacing a jar within Elasticsearch, which will [eventually become an error](https://github.com/elastic/elasticsearch/issues/29177).

---

<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:** [September 11, 2019, 10:01pm UTC](https://discuss.elastic.co/t/why-elasticsearch-has-separate-jna-library/194986/5 "2019-09-11T22:01:11Z")

</div>

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