如何在IDEA 12中使用外部Scala编译器?

exp*_*ert 7 scala intellij-idea

如何在IDEA中使用外部Scala编译器?我似乎随机出现错误说"scala:无法连接到localhost/127.0.0.1:3200的编译服务器"

有时它有效.有时却没有.我找不到模式.

这是我在日志中的内容

9:20:58 PM Auto make completed with errors
9:21:09 PM Using a new (SBT-based) Scala compiler.
           In case of any compilation problems you may enable the previous (internal) compiler by clearing:
           Project Settings / Compiler / Use external build
9:21:10 PM Scala compile server
           Error: Could not create the Java Virtual Machine.
           Error: A fatal exception has occurred. Program will exit.

9:21:12 PM Compilation completed with 1 error and 0 warnings in 3 sec
Run Code Online (Sandbox Code Playgroud)

我正在使用

  • IDEA 12.1(129.161)
  • Scala编译器2.10.1
  • Scala插件0.7.213
  • JDK 1.7
  • Windows 7的

在项目设置/编译器/使用外部版本中进行检查.在IDE Settings/Scala/Run中,检查编译服务器.

我是否需要手动启动编译器服务器?还要别的吗 ?

UPD:看起来像我的错误.我发布了JIRA门票http://youtrack.jetbrains.com/issue/SCL-5523

img*_*gen 6

您需要将堆大小从1024降低到512或其他什么.然后可以创建并启动编译服务器.尝试使用InteliJ 13.0.2(133.331)和Scala插件0.26.361


Ale*_*ula 1

它通常无需更改任何设置即可工作。这听起来像是端口冲突、之前不正常关闭的结果,或者堆大小不足。

在此输入图像描述

尝试通过转到更改编译服务器端口Settings -> Scala (under IDE settings list, towards the bottom) -> TCP port。在那里,您还可以设置不同的最大堆大小。

该问题可能与此公开票证有关。