# Logstash.bat immediately errors out with \\Java\\jdk-11.0.12 was unexpected at this time

**URL:** https://discuss.elastic.co/t/logstash-bat-immediately-errors-out-with-java-jdk-11-0-12-was-unexpected-at-this-time/281264
**Category:** Logstash
**Created:** [August 12, 2021, 8:28pm UTC](https://discuss.elastic.co/t/logstash-bat-immediately-errors-out-with-java-jdk-11-0-12-was-unexpected-at-this-time/281264 "2021-08-12T20:28:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 12, 2021, 8:41pm UTC](https://discuss.elastic.co/t/logstash-bat-immediately-errors-out-with-java-jdk-11-0-12-was-unexpected-at-this-time/281264/2 "2021-08-12T20:41:55Z")

</div>

See [this](https://discuss.elastic.co/t/logstash-crashes-when-i-run-bat-file-from-powershell/280245) thread. I suggest you unset JAVA\_HOME.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-bat-immediately-errors-out-with-java-jdk-11-0-12-was-unexpected-at-this-time/281264)._
