加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

从ensime运行sbt时scala – java.io.IOException?

发布时间:2020-12-16 18:23:39 所属栏目:安全 来源:网络整理
导读:我在mac os上试过了ensime / sbt.首先,我打开项目文件夹中的. scala文件,在命令行中使用sbt创建,然后我运行了ensime,它仍然正常工作,但每当我运行ensime-sbt(c-c c-v s)时,我得到了 java.io.IOException: No such file or directoryat java.io.UnixFileSyste
我在mac os上试过了ensime / sbt.首先,我打开项目文件夹中的. scala文件,在命令行中使用sbt创建,然后我运行了ensime,它仍然正常工作,但每当我运行ensime-sbt(c-c c-v s)时,我得到了

java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at xsbt.boot.Locks$.apply0(Locks.scala:34)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.Iterable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:107)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:83)
at org.apache.ivy.plugins.namespace.NamespaceRule.newEntry(Cache.scala:17)
at org.apache.ivy.plugins.namespace.NamespaceRule.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:85)
at xsbt.boot.Launch$.run(Launch.scala:49)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
    Error during sbt execution: java.io.IOException: No such file or directory

    Process sbt exited abnormally with code 1

我尝试从命令行使用sbt,一切都在那里工作(编译/运行/控制台).我在mac os上的emacs24(2011/07/24)上使用了sbt 0.10.1和最新的二进制文件.

知道我做错了吗?

解决方法

我有这个,在应用strace之后我发现了这个问题. ensime-sbt.el函数从cwd中搜索./project/build.properties.在找到这个目录/文件时,它假定这是根目录.

所以只需创建此文件,此问题就会消失.如果ensime默认创建此文件,那将是很好的,因为它是sbt函数工作所需的文件.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读