0

我一直在尝试使用 FSC 构建 IntelliJ,如下所述:

http://grahamhackingscala.blogspot.com/2010/10/turn-fsc-fast-scala-compiling-on-in.html

我完全按照所有说明来设置运行配置。当我运行时,会发出此命令。

/usr/bin/java -verbose -Denv.classpath="%CLASSPATH%" -Denv.emacs="%EMACS%" -Dfile.encoding=UTF-8 -classpath /opt/local/share/scala-2.8/lib/scala-compiler.jar:/opt/local/share/scala-2.8/lib/scala-library.jar scala.tools.nsc.CompileServer

我传递了 -verbose 参数,然后我可以看到正在加载的内容。以下是最后 10 行输出:

[Loaded java.net.Socket from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded com.apple.java.Usage$3 from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded com.apple.java.Application from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded com.apple.java.Application$1 from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.lang.ProcessEnvironment from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.lang.ProcessEnvironment$ExternalData from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.lang.ProcessEnvironment$Variable from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.lang.ProcessEnvironment$Value from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.lang.ProcessEnvironment$StringEnvironment from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.util.Collections$UnmodifiableMap from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]

即使在一个小时之后,它也永远不会超过这一点。我对 Scala 完全陌生,对 Java 几乎一无所知,所以我在这里没有任何线索。如果有帮助的话,我很乐意提供更多信息,但就目前而言,这真的是我所能提供的。

4

1 回答 1

0

也许你遇到了一个已知的错误http://youtrack.jetbrains.net/issue/SCL-2271

解决方法是手动启动 fsc

您也有可能会绊倒http://youtrack.jetbrains.net/issue/SCL-2409

对于这个,你最好设置一个脚本,每隔半小时重新启动一次 fsc

于 2011-04-29T11:06:23.483 回答