I have installed both OpenJDK 6 and OpenJDK 7; before I was exclusively working with JDK 6. Now I have a couple of Scala projects which produce compile errors because of a problem with Java Generics introduced to Swing in Java 7 (e.g. scala.ListView
produces an error with javax.swing.JList
).
How can I configure my sbt project such that it enforces the use of JDK 6? I would like to enable this on a per-project basis, as I might have other projects which make use of Java 7 API. I would like this configuration to be not depending on my particular local setup, such that if someone checks out my git repository, compilation will still work seemless on the other person's machine.