我正在尝试将play-scalr与 Play 一起使用,并按照Github 页面上的安装说明进行操作,但是当我请求调整大小的图像时出现错误:
[RuntimeException:java.lang.UnsupportedClassVersionError:se/digiplant/scalr/api/Resizer$Mode:不支持的major.minor 51.0版]
当我编译项目时,下载了 jars,所以我认为问题是它们是使用 Java 1.7 编译的,但我正在尝试将它们与 Java 1.6 一起使用:
$ play compile
[info] Loading project definition from /Users/brad/projects/builders/project
[info] Set current project to builders (in build file:/Users/brad/projects/builders/)
[info] Updating {file:/Users/brad/projects/builders/}builders...
[info] downloading http://repo1.maven.org/maven2/se/digiplant/play-scalr_2.10/1.0/play-scalr_2.10-1.0.jar ...
[info] [SUCCESSFUL ] se.digiplant#play-scalr_2.10;1.0!play-scalr_2.10.jar (2782ms)
[info] downloading http://repo1.maven.org/maven2/se/digiplant/play-res_2.10/1.0/play-res_2.10-1.0.jar ...
[info] [SUCCESSFUL ] se.digiplant#play-res_2.10;1.0!play-res_2.10.jar (2553ms)
[info] Done updating.
[success] Total time: 26 s, completed 14/04/2013 3:06:18 PM
这是我正在使用的版本:
$ play about
[info] Loading project definition from /Users/brad/projects/builders/project
[info] Set current project to builders (in build file:/Users/brad/projects/builders/)
[info] This is sbt 0.12.2
[info] The current project is {file:/Users/brad/projects/builders/}builders
[info] The current project is built against Scala 2.10.0
[info] Available Plugins: play.Project, sbt.PlayProject, com.typesafe.sbteclipse.plugin.EclipsePlugin, com.typesafe.sbtidea.SbtIdeaPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.9.2
$ scala -version
Scala code runner version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL
$ java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
$ javac -version
javac 1.6.0_43