# Getting error : jdk-17.0.2 was unexpected at this time

**URL:** <https://discuss.elastic.co/t/getting-error-jdk-17-0-2-was-unexpected-at-this-time/300300>\
**Category:** Elasticsearch\
**Tags:** windows-installer\
**Created:** [March 22, 2022, 8:45am UTC](https://discuss.elastic.co/t/getting-error-jdk-17-0-2-was-unexpected-at-this-time/300300 "2022-03-22T08:45:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yahire](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yahire/32/104451_2.png) [@yahire](https://discuss.elastic.co/u/yahire)\
**Post date:** [March 22, 2022, 8:45am UTC](https://discuss.elastic.co/t/getting-error-jdk-17-0-2-was-unexpected-at-this-time/300300/1 "2022-03-22T08:45:30Z")

</div>

While starting Elasticsearch.bat in my windows system, i am getting following error :

D:\Elastic APM\Elasticsearch-8.1.0\Elasticsearch-8.1.0\bin\>Elasticsearch.bat  
\jdk-17.0.2 was unexpected at this time.

I am having Java\_Home set to openjdk 17

---

<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:** [April 19, 2022, 8:45am UTC](https://discuss.elastic.co/t/getting-error-jdk-17-0-2-was-unexpected-at-this-time/300300/2 "2022-04-19T08:45:46Z")

</div>

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