After typing M-x slime-connect on Emacs, I tried the following.
user> (use 'myproject.core)
nil
user> (my-add 10 20)
30
user> (use 'swank.cdt)
warning: unabled to add tools.jar to classpath. This may cause CDT initialization to fail.
CDT 1.4.0a startup failed: #<RuntimeException java.lang.RuntimeException: java.io.IOException: no providers installed>
nil
At this time, my console shows the next message.
C:\work\lab\myproject> lein swank
Listening for transport dt_socket at address: 50649
Connection opened on localhost port 4005.
java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Pr
ovider sun.tools.attach.WindowsAttachProvider could not be instantiated: java.la
ng.UnsatisfiedLinkError: no attach in java.library.path
And then I restarted lein swank and had the next result.
user> (use 'myproject.core)
nil
user> (my-add 10 20)
30
user> (use 'swank.cdt)
warning: unabled to add tools.jar to classpath. This may cause CDT initialization to fail.
Clearing CDT event requests and continuing.
Swank CDT release 1.4.0a started
nil
And I confirmed on the console that swank.cdt successfully started on Windows 7.
C:\work\lab\myproject> lein swank
Listening for transport dt_socket at address: 53044
Connection opened on localhost port 4005.
CDT ready
This is the solution I found out about the Swank startup failure on Windows 7.
However I met another unexpected problem.
;; This doesn't work
user> (set-bp my-add)
No message.
[Thrown class java.lang.NullPointerException]
user> (print-bps)
nil
;; This seems to work, but I'm not sure of it
;; because of the next message on Minibuffer.
user> (set-bp myproject.core/my-add)
nil
nil
;; The message on Minibuffer at this time
;; error in process filter: Wrong number of arguments: nil, 2
user> (print-bps)
0 myproject.core/my-add
nil
Anyway I continues my experiment as follows.
user> (my-add 20 30)
And then the next window titled sldb clojure/2 showed up.
And then I encountered the new empty window titled myproject%5ccore.clj, where
%5c seems to mean the ascii 0x5c backslash character code in my opinion.
And then I returned to simple-repl-clojure buffer and found the answer 50
(the result of excuting (my-add 20 30)).
and then I retried the following experiment, adding the namespace
'myproject.core' to 'my-add' function.
user> (myproject.core/my-add 20 30)
I encountered again the next sldb clojure/3 window which had
File C:/work/lab/myproject/src/myproject%5ccore.clj no longer exists!
To sum up, in my guess, the first problem is that swank-clojure doesn't process
the backslash character code properly.
And the second problem is that swank-cdt doesn't recognize src/myproject/core.clj
unless I specifiy it explicitly, as in the case (myproject.core/my-add 20 30) in my experiment.
First of all, the following is my clojure programming environment on Windows 7.
My first project.clj is as follows.
I typed the next command on the console.
The following is the content of src/myproject/core.clj.
After typing M-x slime-connect on Emacs, I tried the following.
At this time, my console shows the next message.
I searched the Internet for the solution hint and found the clue on the site http://www.coderanch.com/t/377174/java/java/java-library-path
So I inserted the next newly added line on the project.clj, because the attach.dll was in the folder C:\usr\lang\java\jdk\jre\bin.
And then I restarted lein swank and had the next result.
And I confirmed on the console that swank.cdt successfully started on Windows 7.
This is the solution I found out about the Swank startup failure on Windows 7.
However I met another unexpected problem.
Anyway I continues my experiment as follows.
And then the next window titled sldb clojure/2 showed up.
I didn't have any choice but to do type 0 here.
And then I encountered the new empty window titled myproject%5ccore.clj, where %5c seems to mean the ascii 0x5c backslash character code in my opinion. And then I returned to simple-repl-clojure buffer and found the answer 50 (the result of excuting (my-add 20 30)).
and then I retried the following experiment, adding the namespace 'myproject.core' to 'my-add' function.
I encountered again the next sldb clojure/3 window which had
And the next message on the Minibuffer showed up.
To sum up, in my guess, the first problem is that swank-clojure doesn't process the backslash character code properly.
And the second problem is that swank-cdt doesn't recognize src/myproject/core.clj unless I specifiy it explicitly, as in the case (myproject.core/my-add 20 30) in my experiment.