服務器運行Java Web 項目 啓動報錯:服務器
google 的 解決方案:app
The issue is because of Java version mismatch. Referring to the Wikipedia Java Class Reference :this
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.google
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.code
In Intellij,ip
Restart Intellijget
Another approach which might help is by instructing IDEA which JDK version to start up with.string
Go to : /Applications/IntelliJ\ IDEA\ 15\ CE.app/Contents/Info.plist and replace the JVM version with :it
<key>JVMVersion</key> <string>1.8*</string>
大概的意思 就是說 項目用1.8搞的,就要運行在 1.8的JDK上 ,運行在1.7就出這個錯誤.io
而後我就豁然開朗, 在這裏記錄一下。