# Java.lang.UnsupportedClassVersionError: org/elasticsearch/ElasticsearchException : Unsupported major.minor version 51.0

**URL:** https://discuss.elastic.co/t/java-lang-unsupportedclassversionerror-org-elasticsearch-elasticsearchexception-unsupported-major-minor-version-51-0/22938
**Category:** Elasticsearch
**Created:** [March 27, 2015, 6:56am UTC](https://discuss.elastic.co/t/java-lang-unsupportedclassversionerror-org-elasticsearch-elasticsearchexception-unsupported-major-minor-version-51-0/22938 "2015-03-27T06:56:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Vijayakumari\_B\_N](https://avatars.discourse-cdn.com/v4/letter/v/da6949/32.png) [@Vijayakumari\_B\_N](https://discuss.elastic.co/u/Vijayakumari_B_N)
#### Post date: [March 27, 2015, 6:56am UTC](https://discuss.elastic.co/t/java-lang-unsupportedclassversionerror-org-elasticsearch-elasticsearchexception-unsupported-major-minor-version-51-0/22938/1 "2015-03-27T06:56:23Z")

</div>

Hi,

I have jdk1.7.0\_75 in linux and elasticsearch server 1.4.1, but while  
starting my jboss server i am getting below exception. I am able to run  
elasticsearch server using same version. Any body knows what is java  
compatible version for elastic search 1.4.1.

java.lang.UnsupportedClassVersionError:  
org/elasticsearch/ElasticsearchException : Unsupported major.minor version  
51.0

I do not have version 51 anywhere in my system, please advice

Thanks,  
Vijaya

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 27, 2015, 8:12am UTC](https://discuss.elastic.co/t/java-lang-unsupportedclassversionerror-org-elasticsearch-elasticsearchexception-unsupported-major-minor-version-51-0/22938/2 "2015-03-27T08:12:51Z")

</div>

Even though you have installed java7, it sounds like your JAVA\_HOME is set to java6...

Check your config.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 27 mars 2015 à 07:56, Vijayakumari B N [vijayakumari.bn@gmail.com](mailto:vijayakumari.bn@gmail.com) a écrit :
> 
> Hi,
> 
> I have jdk1.7.0\_75 in linux and elasticsearch server 1.4.1, but while starting my jboss server i am getting below exception. I am able to run elasticsearch server using same version. Any body knows what is java compatible version for Elasticsearch 1.4.1.
> 
> java.lang.UnsupportedClassVersionError: org/elasticsearch/ElasticsearchException : Unsupported major.minor version 51.0
> 
> I do not have version 51 anywhere in my system, please advice
> 
> ## Thanks, Vijaya
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/AED34B15-2048-43F2-B925-3FCF60918C0A%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/AED34B15-2048-43F2-B925-3FCF60918C0A%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)
#### Post date: [March 27, 2015, 8:20am UTC](https://discuss.elastic.co/t/java-lang-unsupportedclassversionerror-org-elasticsearch-elasticsearchexception-unsupported-major-minor-version-51-0/22938/3 "2015-03-27T08:20:52Z")

</div>

Double check you are using JDK 1.7 or higher for your Elastic/JBoss combination.

It looks like you are using JDK 1.6 - the exception indicates that the Java runtime doesn't recognize the bytecode  
version (51.0 stands for Java 7 class files [1]).

The class files major versions are:

Java 8 = 52, Java 7 = 51, Java 6 = 50, Java 5 = 49

[1] [Java class file - Wikipedia](http://en.wikipedia.org/wiki/Java_class_file)

On 3/27/15 8:56 AM, Vijayakumari B N wrote:

> Hi,
> 
> I have jdk1.7.0\_75 in linux and elasticsearch server 1.4.1, but while starting my jboss server i am getting below  
> exception. I am able to run elasticsearch server using same version. Any body knows what is java compatible version for  
> Elasticsearch 1.4.1.
> 
> java.lang.UnsupportedClassVersionError: org/elasticsearch/ElasticsearchException : Unsupported major.minor version 51.0
> 
> I do not have version 51 anywhere in my system, please advice
> 
> Thanks,  
> Vijaya
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/0b2880fb-324b-4d09-920f-a075d48393a0%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/551512E4.5090801%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/551512E4.5090801%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 6, 2017, 12:23am UTC](https://discuss.elastic.co/t/java-lang-unsupportedclassversionerror-org-elasticsearch-elasticsearchexception-unsupported-major-minor-version-51-0/22938/4 "2017-07-06T00:23:31Z")

</div>


