How can I set the javac compile version for Play Framework 2.0 to prevent “Unsupported major.minor version”?

前端 未结 4 685
深忆病人
深忆病人 2021-02-07 11:39

A module I am using must have been compiled with Java 1.7, and I only have 1.6.

If I want to for the module to be compiled for a specific version like 1.6, how can I set

4条回答
  •  庸人自扰
    2021-02-07 12:27

    Adding

    javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
    

    to the build.sbt file worked for me (to be transparent, in my case it was 1.7 to build with JDK 8).

提交回复
热议问题