[英]Ensime inferior scala mode
我已經為Scala設置了Emacs + Ensime。
我可以使用Cc Cv在emacs中啟動sbt控制台
如果我使用Cc Cv z在emacs中啟動scala控制台,則會出現以下錯誤
Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
scala>
Failed to initialize compiler: class scala.reflect.BeanInfo not found
該錯誤的解決方法是什么? 我如何在Emacs中運行Scala控制台?
我最近遇到了類似的錯誤,但是這是我的解決方法(但是我不知道如何解決它,所以這只是答案的一半)。 我所做的是自定義ensime-inf-default-cmd-line
變量,使其具有值: '("sbt" "console")
。 這確實將啟動交互式Scala環境。
編輯:
這是.emacs
的相關部分,但我不確定在每次安裝中都一樣/是否相同:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
;;
;; more stuff ...
;; I'm not sure this line is correct / makes any difference
'(ensime-inf-cmd-template (quote ("sbt" "console" "-classpath" :classpath)))
;; This variable is used to launch the interpreter
'(ensime-inf-default-cmd-line (quote ("sbt" "console"))))
(require 'scala-mode2)
(add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode))
(add-to-list 'load-path "~/.emacs.d/ensime/elisp/")
(require 'ensime)
(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)
我已經從MELPA安裝了scala-mode2
mode2。 通過從其站點下載RPM安裝了sbt
版本0.12.0。 我以前安裝了JRE和JDK,活動版本是OpenJDK 1.7。 安裝的Scala是2.9.2。 我不知道如何識別Ensime的版本:|
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.