Unsupported major.minor version 51.0 while running play framework

后端 未结 3 991
半阙折子戏
半阙折子戏 2021-02-01 17:22

I know there is version conflict. Just want someone to tell me how to resolve it. In previous stackoverflow post no one tells the solution.

Versions: Ubuntu: 12.04.1 LTS

3条回答
  •  一生所求
    2021-02-01 18:00

    A better solution is to change the target version, so you could compile to 1.6 from 1.7 like this: How can I set the javac compile version for Play Framework 2.0 to prevent "Unsupported major.minor version"?

    Put this in your Build.scala:

    val main = play.Project(appName, appVersion, appDependencies).settings(
      // Force compilation in java 1.6
      javacOptions in Compile ++= Seq("-source", "1.6", "-target", "1.6")
    )
    

提交回复
热议问题