关闭

unsupported major.minor version 52.0

628人阅读 评论(0) 收藏 举报
分类:

The issue is because of Java version mismatch. Referring to the Wikipedia Java Class Reference :

  • 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

These are the reported major numbers. The error regarding the unsupported major.minor version is because during compile time you are using a higher JDK and a lower JDK during runtime.

Thus, the 'major.minor version 52.0' error is possibly because the jar is compiled in jdk 1.8, but you are trying to run it in jdk 1.7 environment. To solve this, it's always better to have the jdk and jre pointed to the same version.

In Intellij, 

  1. Go to Maven Settings -> Maven -> Importing. Set the JDK for importer to 1.8
  2. Go to Maven Settings -> Maven -> Runner. Set the JRE to 1.8
  3. Go to File -> Project Structure -> SDKs. Make sure the JDK home path is set to 1.8

Restart Intellij

Another approach which might help is by instructing IDEA which JDK version to start up with.

Go to : /Applications/IntelliJ\ IDEA\ 15\ CE.app/Contents/Info.plist and replace the JVM version with :

<key>JVMVersion</key>
<string>1.8*</string>
0
0
查看评论

Unsupported major.minor version 52.0解决办法

1.首先解释一下: stanford parser和jdk版本对应关系 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...
  • superit401
  • superit401
  • 2017-05-25 19:35
  • 6740

jar包对不同JDK版本的兼容性问题:Unsupported major.minor version 52.0

Unsupported major.minor version 52.0 这类错误是因为Java版本不一致造成的,在高版本的JDK(1.8)环境中编译JAR包,然后JAR在低版本的JVM(1.6)中运行
  • skylin19840101
  • skylin19840101
  • 2016-08-15 16:13
  • 9395

Unsupported major.minor version 52.0

Unsupported major.minor version 50.0
  • tengdazhang770960436
  • tengdazhang770960436
  • 2017-04-05 17:00
  • 21006

Unsupported major.minor version 52.0 error

今天,用intellij idea编译了java工程后,上传到测试服务器上之后,出现Unsupported major.minor version 52.0 error的错误,这是因为我本地使用的是jdk1.8版本,而服务器上使用的jdk是1.7版本。 可以通过File->setting...
  • u013817349
  • u013817349
  • 2016-08-11 16:43
  • 1874

Stanford Parser demo错误:Unsupported major.minor version 52.0 error

运行Stanford Parser demo时出现错误: Unsupported major.minor version 52.0 error 出现问题原因: JDK的问题:在eclipse中开发的项目有个java build path中可以配置的jdk,还有个java compiler中可以配置c...
  • pipisorry
  • pipisorry
  • 2015-01-21 11:04
  • 50786

Unsupported major.minor version 52.0那点坑

先吐槽一下,eclipse虽然看起来简洁,但是对于android开发者来说在很多方面还是极为的的不利 先说说这个问题的来源,由于更新了最新的SDK,导致出现了 Unsupported major.minor version 52.0 就是JDK7无法编译JDK8的新特性的.class文件 ...
  • LGGisKing
  • LGGisKing
  • 2016-07-11 14:28
  • 5158

org/eclipse/jetty/server/Handler : Unsupported major.minor version 52.0

记录在java中使用jetty是遇到的错误 jdk版本与jetty版本不匹配问题 Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/server/Hand...
  • summerSunStart
  • summerSunStart
  • 2017-12-21 15:53
  • 90

Android studio 出现 Unsupported major.minor version 52.0

最近更新了Android studio 之后,出现了 Error:java.lang.UnsupportedClassVersionError:com/android/dx/command/Main : Unsupported major.minor version 52.0 异常,这是因...
  • yxhuang2008
  • yxhuang2008
  • 2016-04-08 20:14
  • 13247

Android studio 出现 Unsupported major.minor version 52.0

最近更新了Android studio 之后,出现了Error:java.lang.UnsupportedClassVersionError:com/android/dx/command/Main : Unsupported major.minor version 52.0 ...
  • fakine
  • fakine
  • 2016-04-25 11:54
  • 21534

Android Studio Unsupported major.minor version 52.0

Unsupported major.minor version 52.0 对应jdk1.8 Unsupported major.minor version 51.0 对应jdk1.7 Unsupported major.minor version 50.0 对应jdk1.6 Unsupp...
  • huyuchaoheaven
  • huyuchaoheaven
  • 2016-10-12 14:32
  • 1336
    个人资料
    • 访问:13358次
    • 积分:287
    • 等级:
    • 排名:千里之外
    • 原创:8篇
    • 转载:48篇
    • 译文:0篇
    • 评论:4条
    文章分类