clojure slime/swank mode problem -- still NewBie

6 views
Skip to first unread message

wubbie

unread,
Dec 28, 2008, 7:03:55 PM12/28/08
to Clojure
Hi all,

I've been using command line Repl for a while and want to move to
slime/emacs
so I followed instructions in wiki
and got errors in emacs:

I was able to load ants.clj in upper panel.
On the bottom panel, alt -x slime give me the following errors:
(require 'swank.swank)

(swank.swank/ignore-protocol-version "2008-12-27")

(swank.swank/start-server "/tmp/slime.6833" :encoding "iso-latin-1-
unix")

Exception in thread "main" java.lang.NoClassDefFoundError: clojure/
main
Caused by: java.lang.ClassNotFoundException: clojure.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: clojure.main. Program will exit.

Process inferior-lisp exited abnormally with code 1



What can go wrong here?

Thanks
Sun

wubbie

unread,
Dec 28, 2008, 7:22:50 PM12/28/08
to Clojure
Also my .emacs is pasted here:
Just copy from wiki...


;; clojure mode
(add-to-list 'load-path "/usr/local/clojure-mode")
(require 'clojure-auto)

;; Slime
(add-to-list 'load-path "/usr/local/slime")
(require 'slime)
(slime-setup)

;; clojure swank
(setq swank-clojure-jar-path "/usr/local/clojure/target/clojure-
lang-1.0-SNAPSHOT.jar")
; alternatively, you can set up the clojure wrapper script and use
that:
; (setq swank-clojure-binary "/path/to/cljwrapper")

; you can also set up extra classpaths, such as the classes/ directory
used by AOT compilation
;(setq swank-clojure-extra-classpaths (list "/path/to/extra/
classpaths" "/even/more/classpaths"))

(add-to-list 'load-path "/usr/local/swank-clojure")
(require 'swank-clojure-autoload)

;; is this required? I don't have this in my emacs configuration; I
just execute M-x slime to start slime -- Chousuke
(defun run-clojure ()
"Starts clojure in Slime"
(interactive)
(slime 'clojure))

;; To use other Lisps...
;; Incidentally, you can then choose different Lisps with
;; M-- M-x slime <tab>
;; (add-to-list 'slime-lisp-implementations
;; '(sbcl ("/path/to/bin/sbcl")))
Reply all
Reply to author
Forward
0 new messages