Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch

Hello ,
I have download Elasticsearch 2.3.3 and tried to install it on my laptop Windows7 - 64bit.

C:\Elastic\elasticsearch-2.3.3\bin>java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

I am getting the following error message
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticse
arch/bootstrap/Elasticsearch : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at Source)
at Source)
at$000(Unknown Source)
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.elasticsearch.bootstrap.Elasticsearch. Progr
am will exit.

Please advise


Probably your JAVA_HOME is wrongly set and points to a java version 1.6 ?

1 Like

Yep .....

C:\Users\yoavb>set JAVA_HOME=C:\Program Files\Java\jre7

C:\Users\yoavb>cd C:\Elastic\elasticsearch-2.3.3\bin

.... Succsessfully installed and started .