Skip to content
Tags

,

Unsupported major.minor version 51.0

15 novembre 2012

During deployment of an EAR file on JBoss 6.0 I received this error (the sample is not really what I read on log file)

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)

Looking for a solution I’ve found the answer on StackOverflow.

Note to self:

The version number shown describe which version if Java was used to compile the code.

The reported major numbes are:

J2SE 7 = 51,
J2SE 6.0 = 50,
J2SE 5.0 = 49,
JDK 1.4 = 48,
JDK 1.3 = 47,
JDK 1.2 = 46,
JDK 1.1 = 45

(source: http://en.wikipedia.org/wiki/Java_class_file )

and

you have to change the version of java in facet of your project

From → Development

Lascia un commento

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger cliccano Mi Piace per questo: