title: Java version compatibility with Apache Spark and Elastic search
body: <p>We use Java 8, <code>org.elasticsearch.client:elasticsearch-rest-client:7.16</code>,  <code>org.springframework.data:spring-data-elasticsearch:4.4.0-M2</code> and <code>org.apache.spark:spark-core:3.2.0</code>.</p>
  <p>There are vulnerabilities reported with ES 7.16 so we have to upgrade to ES 8 &amp; spring data elasticsearch 5 in the near future</p>
  <p>We might be forced to upgrade to java 17. Here is from readme <a href="https://github.com/spring-projects/spring-data-elasticsearch" rel="nofollow noreferrer">https://github.com/spring-projects/spring-data-elasticsearch</a></p>
  <blockquote>
  <p>In Elasticsearch 8, the RestHighLevelCLient has been removed. This
  means that a switch to this client version can only be done with the
  next major upgrade which will be Spring Data Elasticsearch 5, based on
  Spring Data 3, used by Spring Boot 3, based on Spring 6 and Java 17.</p>
  </blockquote>
  <p>However, The latest version of Spark only supports java 11 so we can't really rely on java 17 features. I couldn't find this discussion anywhere which made me wonder if our team is the only one using this group of technologies. Any suggestions how can we keep our versions up to date with this tech stack?</p>
  <p>EDIT:
  Just found out on Reddit that Java 17 is supported <a href="https://www.reddit.com/r/apachespark/comments/tkifvl/any_plans_for_spark_to_support_java_17/" rel="nofollow noreferrer">https://www.reddit.com/r/apachespark/comments/tkifvl/any_plans_for_spark_to_support_java_17/</a></p>