{"id":2672,"date":"2018-02-22T11:38:03","date_gmt":"2018-02-22T11:38:03","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=2672"},"modified":"2018-03-03T15:35:43","modified_gmt":"2018-03-03T15:35:43","slug":"major-minor-version-during-ear-deplyment","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/major-minor-version-during-ear-deplyment\/","title":{"rendered":"Major Minor Version during EAR deployment"},"content":{"rendered":"<pre>\r\njava.lang.UnsupportedClassVersionError: test_hello_world :\r\n Unsupported major.minor version 51.0\r\n    at java.lang.ClassLoader.defineClass1(Native Method)\r\n    at java.lang.ClassLoader.defineClassCond(Unknown Source)\r\n<\/pre>\n<p><strong>Why this Happens?<\/strong><br \/>\nWhen you did maven build in Java 8 and try to deploy the ear file in Server which uses Java 1.7 then this issue happens.Error means you&#8217;re trying to load a Java &#8220;class&#8221; file that was compiled with a newer version of Java than you have installed.For example, your .class file could have been compiled for JDK 7, and you&#8217;re trying to run it with JDK 6.You must have compiled your code with a higher version and trying to run it using a lower version<\/p>\n<p><strong>Solution<\/strong><\/p>\n<pre>\r\nWindow -> Preferences -> Java -> Compiler and then set \"Compiler compliance level\" to 1.7\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>java.lang.UnsupportedClassVersionError: test_hello_world : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) Why this Happens? When you did maven build in Java 8 and try to deploy the ear file in Server which uses Java 1.7 then this issue happens.Error means you&#8217;re trying to load a Java &#8220;class&#8221; file that was compiled with a&hellip; <a href=\"https:\/\/codethataint.com\/blog\/major-minor-version-during-ear-deplyment\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[234],"tags":[],"class_list":["post-2672","post","type-post","status-publish","format-standard","hentry","category-servers-and-issues"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=2672"}],"version-history":[{"count":3,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2672\/revisions"}],"predecessor-version":[{"id":2682,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2672\/revisions\/2682"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=2672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=2672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=2672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}