使用java.io.IOException在windwos中scala-native build失败:无法运行程序“which”错误

时间:2016-05-19 07:02:24

标签: scala sbt native scala-native

当我使用sbt rtlib/publishLocal nscplugin/publishLocal构建Scala本机演示时,它会出现以下错误

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

Scala代码运行器版本2.12.0-M3 -- Copyright 2002-2015, LAMP/EPFL

错误

[info] Loading project definition from D:\Work\RandD\WSAMITScript\Scala-Native\scala-native\project
java.io.IOException: Cannot run program "which": CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
    at sbt.AbstractProcessBuilder.lines(ProcessImpl.scala:149)
    at sbt.AbstractProcessBuilder.lines_$bang(ProcessImpl.scala:143)
    at scala.scalanative.sbtplugin.ScalaNative

2 个答案:

答案 0 :(得分:7)

Scala Native目前不支持Windows。按照the corresponding issue跟踪该方面的进度。

答案 1 :(得分:1)

你是否尝试过在Cygwin终端内工作?