Sunday, 18 May 2014

invalid target release 1.7 - Maven

invalid target release 1.7 - Maven

If we are getting this kind of error then please check maven complier  is mismatch or not and correct it


Saturday, 10 May 2014

fixed Unsupported major.minor version 51.0

Recently I moved to Java 7.  I was doing coding , I opened my old project which was in  Java 1.6.
my eclipse started giving me this error which is :
=========================
Unsupported major.minor version 51.0
=========================================
java.lang.UnsupportedClassVersionError: com/javapapers/spring/SpringEmail : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Exception in thread "main" 
=========================================
I found solution for this 

it was version mismatch with jre

J2SE 8 = 52,
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

I recompile with java 1.6