How to specify which java version to use with sbt 0.12.4? I have java 7 and java 8 installed. Since sbt 0.12.4 does not support java 8 but tries to use it by default, I have to specify java version explicitly for sbt. I want to keep using java 8 as a default version of java for other things.
相关问题
- Unusual use of the new keyword
- Get Runtime Type picked by implicit evidence
- What's the point of nonfinal singleton objects
- PlayFramework: how to transform each element of a
- Error in Scala Compiler: java.lang.AssertionError:
相关文章
- Gatling拓展插件开发,check(bodyString.saveAs("key"))怎么实现
- RDF libraries for Scala [closed]
- Why is my Dispatching on Actors scaled down in Akk
- How do you run cucumber with Scala 2.11 and sbt 0.
- GRPC: make high-throughput client in Java/Scala
- Setting up multiple test folders in a SBT project
- Testing request with CSRF Token in Play framework
- Run project with java options via sbt
One way that works well for me is, using the sbt script from sbt-extras and add to the root of the project a file called
.sbtopts
with:using whatever version of Java 7 you want to use. Make sure that those are on separate.
If you're not using the sbt script from sbt-extras you could use jEnv.
After configuring jEnv, from the root of the project run
jenv local 1.7
, which will create a file called.java-version
with content "1.7".Then every time you run
java
(orjavac
, etc) in that project (including from any directory in that project) it will run the 1.6 version, thanks to jEnv's shim mechanisms.