This page is no longer maintained — Please continue to the home page at www.scala-lang.org

ensime on windows help

1 reply
Razvan Cojocaru 3
Joined: 2010-07-28,
User offline. Last seen 42 years 45 weeks ago.

Hi – I was trying to setup the ensime on windows and I’m now stuck…

 

I bring up emacs from a project’s home and when typing M-x ensime I get this message and I can’t get content assist, on errors underlined.. nothing:

Failed to connect to Swank: server process exited.

 

I have

-          Emacs in C:\bin\emacs-23.3\

-          Scala 2.9.1 in C:\bin\scala

-          Ensime in C:\bin\scala\ensime (latest)

 

Here’s my .emacs file:

 

 

(setq viper-mode t)

(require 'viper)

 

 

(add-to-list 'load-path "c:/bin/scala/misc/scala-tool-support/emacs")

(require 'scala-mode-auto)

 

;; Load the ensime lisp code...

;;(add-to-list 'load-path "/c/bin/scala/ensime/elisp/")

(add-to-list 'load-path "c:/bin/scala/ensime/elisp/")

(require 'ensime)

 

;; This step causes the ensime-mode to be started whenever

;; scala-mode is started for a buffer. You may have to customize this step

;; if you're not using the standard scala mode.

(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)

 

(desktop-save-mode 1)

 

 

-------------- sorry, stuck here – can’t figure it out and google can’t help me

 

----------- thanks,

Razie

 

Sebastien Bocq
Joined: 2008-12-18,
User offline. Last seen 42 years 45 weeks ago.
Re: ensime on windows help


2011/9/30 Razvan Cojocaru <pub [at] razie [dot] com>

Hi – I was trying to setup the ensime on windows and I’m now stuck…

 

I bring up emacs from a project’s home and when typing M-x ensime I get this message and I can’t get content assist, on errors underlined.. nothing:

Failed to connect to Swank: server process exited.

 

I have

-          Emacs in C:\bin\emacs-23.3\

-          Scala 2.9.1 in C:\bin\scala

-          Ensime in C:\bin\scala\ensime (latest)

 

Here’s my .emacs file:

 

 

(setq viper-mode t)

(require 'viper)

 

 

(add-to-list 'load-path "c:/bin/scala/misc/scala-tool-support/emacs")

(require 'scala-mode-auto)

 

;; Load the ensime lisp code...

;;(add-to-list 'load-path "/c/bin/scala/ensime/elisp/")

(add-to-list 'load-path "c:/bin/scala/ensime/elisp/")

(require 'ensime)

 

;; This step causes the ensime-mode to be started whenever

;; scala-mode is started for a buffer. You may have to customize this step

;; if you're not using the standard scala mode.

(add-hook 'scala-mode-hook 'ensime-scala-mode-hook)

 

(desktop-save-mode 1)

 

 

-------------- sorry, stuck here – can’t figure it out and google can’t help me

 

----------- thanks,

Razie

 


I reported a similar issue a last year but I can't find it anymore on github. If I remember correctly, I had to set explicitly the java path in  "%APPDATA%/.emacs.d/vendor/ensime/bin/server.bat" like this:

"C:\Program Files\Java\jdk1.6.0_18\bin\java" -classpath %CLASSPATH% -Xms%INITIAL_HEAP% -Xmx%MAX_HEAP% org.ensime.server.Server %PORT_FILE%

Hope it helps,
Sébastien

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland