启动项目报错:Unsupported major.minor version 52.0

解决方案:

    确保Build Path或者电脑配置的环境变量版本号,和pom中的一致

    Exception in thread "main" java.lang.UnsupportedClassVersionError: com/demo/pringboot/Application : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

 

常见,电脑或Linux系统中java version是1.7,开发环境是1.8,则部署启动时会出现该错误

转载于:https://www.cnblogs.com/qianzf/p/11507013.html

你可能感兴趣的:(启动项目报错:Unsupported major.minor version 52.0)