SBT/Play using different Java version to compile when run from Java process

352 views
Skip to first unread message

Galder Zamarreño

unread,
Mar 26, 2013, 2:39:07 PM3/26/13
to simple-b...@googlegroups.com
Hi,

I'm running "play clean package" from a Java program, which uses SBT underneath, and the resulting classes are compiled with Java 7.

Doing "javap -v controllers.routes" shows:
  minor version: 0
  major version: 51

I have JAVA_HOME set to java6, and in fact when I run the same from the command line, the result is:
  minor version: 0
  major version: 50

Underneath Play uses SBT 0.12.2.

I have specifically set the following in Build.scala:

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

Any idea how to debug this further? What SBT logging could be added to trace this?

Cheers,
Galder

Galder Zamarreño

unread,
Mar 26, 2013, 2:51:13 PM3/26/13
to simple-b...@googlegroups.com
My bad, I was putting javacOptions in the wrong place.

Thanks
Reply all
Reply to author
Forward
0 new messages