# Unable to start elasticsearch 6.2.0 in windows 10

**URL:** <https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851>\
**Category:** Elasticsearch\
**Created:** [February 7, 2018, 1:35pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851 "2018-02-07T13:35:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bikkina\_mahesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bikkina_mahesh/32/49176_2.png) [@bikkina\_mahesh](https://discuss.elastic.co/u/bikkina_mahesh)\
**Post date:** [February 7, 2018, 1:35pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/1 "2018-02-07T13:35:55Z")

</div>

My java version is :  
java version "1.8.0\_151"  
Java(TM) SE Runtime Environment (build 1.8.0\_151-b12)  
Java HotSpot(TM) Client VM (build 25.151-b12, mixed mode)  
and JAVA\_HOME is set correctly

and when i am running the elastic search i am getting this below error

C:\Users\venkatan\MySoftwares\elasticsearch-6.2.0\bin\>elasticsearch

\Java\jdk1.8.0\_151\bin\java.exe" -cp "C:\Users\venkatan\MySoftwares\elasticsearch-6.2.0\lib\*" "org.elasticsearch.tools.launchers.JvmOptionsParser" "C:\Users\venkatan\MySoftwares\elasticsearch-6.2.0\config\jvm.options" || echo jvm\_options\_parser\_failed"`) was unexpected at this time.

Can anyone please help. i am stuck with this.  
Quick reply would be very helpful.

---

<div class="post-metadata">

**Author:** ![kindofmagic](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kindofmagic](https://discuss.elastic.co/u/kindofmagic)\
**Post date:** [February 11, 2018, 9:48pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/2 "2018-02-11T21:48:14Z")

</div>

same issue here, with java version "1.8.0\_161".  
Please help!  
thanks a lot

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [February 12, 2018, 3:31am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/3 "2018-02-12T03:31:54Z")

</div>

Can you show exactly what the `JAVA_HOME` environment variable value is, using either

Command Prompt

```auto
echo %JAVA_HOME%

```

PowerShell

```auto
gci env:JAVA_HOME

```

Please copy the output **exactly as is** , including any surrounding quotes. For example, for me, running the PowerShell version yields

```auto
Name Value
---- -----
JAVA_HOME C:\Program Files\Java\jdk1.8.0_162

```

---

<div class="post-metadata">

**Author:** ![Krunal\_kalaria](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krunal_kalaria/32/23862_2.png) [@Krunal\_kalaria](https://discuss.elastic.co/u/Krunal_kalaria)\
**Post date:** [February 12, 2018, 6:18am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/4 "2018-02-12T06:18:01Z")

</div>

hi @bikkina_mahesh,

Can you change in environment variable

variable name = JAVA\_HOME  
variable value = C:\Program Files\Java\jdk1.8.0\_144

then restart your cluster it may be work.

Thanks & Regards,  
Krunal.

---

<div class="post-metadata">

**Author:** ![kindofmagic](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kindofmagic](https://discuss.elastic.co/u/kindofmagic)\
**Post date:** [February 12, 2018, 9:12am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/5 "2018-02-12T09:12:55Z")

</div>

Hello,

Thanks for your help.  
I checked my install of java jdk 1.8.0\_161 and noticed that it was stored in program Files x86 folder although it was the 64 bit version - I don’t understand why since I only ran the java exe install.  
But anyway I unistalled it and installed the 1.8.0\_162 and now elasticsearch works perfectly.

Thanks and regards

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [February 12, 2018, 10:01am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/6 "2018-02-12T10:01:59Z")

</div>

glad you got it sorted 😄 I suspect the original `JAVA_HOME` environment variable value _may_ have contained surrounding quotes.

---

<div class="post-metadata">

**Author:** ![A\_M](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@A\_M](https://discuss.elastic.co/u/A_M)\
**Post date:** [February 21, 2018, 8:45pm UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/7 "2018-02-21T20:45:13Z")

</div>

HI,  
if your java is installed under C:\Program Files (x86) then set the JAVA\_HOME like will below

set JAVA\_HOME=C:\Progra~2\Java\jre1.8.0\_131

if your java is installed under C:\Program Files then set the JAVA\_HOME like will below  
set JAVA\_HOME=C:\Progra~1\Java\jre1.8.0\_131

After that try to start the elastic search, it should start then.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [February 22, 2018, 1:23am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/8 "2018-02-22T01:23:16Z")

</div>

@A_M As an alternative to using short paths, you can also set a value with spaces and parentheses by quoting the whole assignment

```auto
set "JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_131"

```

You can also use `setx` to set it as a Machine Environment variable (the value will not be reflected in the current process though, unlike using `set`)

```auto
setx -m JAVA_HOME "C:\Program Files (x86)\Java\jre1.8.0_131"

```

or with PowerShell

```auto
[Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files (x86)\Java\jre1.8.0_131", "Machine")

```

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [February 22, 2018, 2:42am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/9 "2018-02-22T02:42:35Z")

</div>

This is a bug, the problem is the `()` ruin the statement that tries to launch the JVM parser. See [https://github.com/elastic/elasticsearch/pull/28753](https://github.com/elastic/elasticsearch/pull/28753) for the explanation and the fix. This will be fixed in the next release. For now, you can workaround this by not locating Java nor Elasticsearch under a directory with `()` in the name.

---

<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:** [March 22, 2018, 2:43am UTC](https://discuss.elastic.co/t/unable-to-start-elasticsearch-6-2-0-in-windows-10/118851/10 "2018-03-22T02:43:04Z")

</div>

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