# Elasticsearch8.5.0 jar hell problem

**URL:** <https://discuss.elastic.co/t/elasticsearch8-5-0-jar-hell-problem/318619>\
**Category:** Elasticsearch\
**Created:** [November 10, 2022, 7:27am UTC](https://discuss.elastic.co/t/elasticsearch8-5-0-jar-hell-problem/318619 "2022-11-10T07:27:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asasas234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asasas234/32/113152_2.png) [@asasas234](https://discuss.elastic.co/u/asasas234)\
**Post date:** [November 10, 2022, 7:27am UTC](https://discuss.elastic.co/t/elasticsearch8-5-0-jar-hell-problem/318619/1 "2022-11-10T07:27:44Z")

</div>

```auto
warning: ignoring JAVA_HOME=/home/lizhibo/.sdkman/candidates/java/current; using bundled JDK
java=/home/lizhibo/elasticsearch-8.5.0/jdk/bin/java
[2022-11-10T15:23:01,353][ERROR][o.e.b.Elasticsearch] [node-1] fatal exception while booting Elasticsearchjava.lang.IllegalStateException: jar hell!
class: sun.applet.AppContextCreator
jar1: /usr/local/java/lib/tools.jar
jar2: /usr/local/java/jre/lib/rt.jar
        at org.elasticsearch.base@8.5.0/org.elasticsearch.jdk.JarHell.checkClass(JarHell.java:315)
        at org.elasticsearch.base@8.5.0/org.elasticsearch.jdk.JarHell.checkJarHell(JarHell.java:233)
        at org.elasticsearch.base@8.5.0/org.elasticsearch.jdk.JarHell.checkJarHell(JarHell.java:84)
        at org.elasticsearch.server@8.5.0/org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:180)
        at org.elasticsearch.server@8.5.0/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:66)

See logs for more details.

ERROR: Elasticsearch did not exit normally - check the logs at /home/lizhibo/es-work/logs/heartbeat-es.log

ERROR: Elasticsearch exited unexpectedly

```

My operating system is centos7, and the version of elasticsearch is 8.5.0. The version of usr/local/java is 1.8. my question is why there is still a jar conflict between / usr/local/java when I print environment variables and use the built-in JDK of Java. How to solve the problem?

---

<div class="post-metadata">

**Author:** ![asasas234](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asasas234/32/113152_2.png) [@asasas234](https://discuss.elastic.co/u/asasas234)\
**Post date:** [November 11, 2022, 1:10am UTC](https://discuss.elastic.co/t/elasticsearch8-5-0-jar-hell-problem/318619/2 "2022-11-11T01:10:51Z")

</div>

I solved this problem by myself. I opened the DEBUG log and found that the path of the log output java.class.path contains the path of / usr/local/java. Then I set-Djava.class.path to the home directory of ES in the jvm.options file, and the problem is solved.

---

<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:** [December 9, 2022, 1:11am UTC](https://discuss.elastic.co/t/elasticsearch8-5-0-jar-hell-problem/318619/3 "2022-12-09T01:11:40Z")

</div>

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