Your problem isn't sbt. I suspect something interesting on your classpath.
% sbt compile
Detected sbt version 0.11.2
Using /Users/paulp/.sbt/0.11.2 as sbt dir, -sbt-dir to override.
[info] Loading global plugins from /Users/paulp/.sbt/0.11.2/plugins
[info] Set current project to guava (in build file:/s/guava-libraries/guava/)
[info] Compiling 388 Java sources to
/s/guava-libraries/guava/target/scala-2.9.1/classes...
[success] Total time: 15 s, completed Apr 13, 2012 12:40:16 AM
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> Yep, so SBT uses the javac that is on your path and this was a bug with
> OpenJDK. I wrote up some instructions on how to install Oracle JDK. I
> followed someone else's originally and they had a poor usage of
> update-alternatives which changed only my java version and not my javac
> version, which led to some confusion as well.
> http://www.benmccann.com/dev-blog/installing-oracle-java-jdk-on-ubuntu/
Note that you can control the version of Java used with javaHome:
javaHome := Some(file("/path/to/java/home"))
If you put this in ~/.sbt/global.sbt, it should take effect for all of your projects and plugins built on your machine without having to publish it as part of your build (where it won't work for others).
-Mark