Question

I am trying to use the JACOB library with Clojure using Clojure Box.

I have added this to my .emacs:

(setq swank-clojure-library-paths (list "c:/dev/dlls")) 

C:/dev/dlls/ contains the jacob-1.14.3-x86.dll.

I have added a .clojure dir to my ~/ dir and that contains the jacob.jar.

At the Clojure Box REPL, (System/getProperty "java.class.path") yields:

"c:/Program Files/Clojure Box/clojure/clojure.jar;c:/Program Files/Clojure Box/clojure-contrib/clojure-contrib.jar;;c:/Documents and Settings/mac009/Application Data/.clojure/jacob.jar"

and

"Settings/mac009/Application Data/.clojure/jacob.jar" 

and (System/getProperty "java.library.path") yields:

"c:/dev/dlls" 

If I start Clojure Box and issue (import '(com.jacob.com Dispatch ComThread)), the REPL just hangs.

Now for the weird part. If I kill the REPL and do "Alt-X slime" and answer no to "Create an additional inferior-lisp? (y or n)" and issue "(import '(com.jacob.com Dispatch ComThread))" it works! Even weirder is that this only "works" if I first issue "(import '(com.jacob.com Dispatch ComThread))" and make the REPL hang. If I just start Clojure Box and kill/restart the REPL without first issuing "(import '(com.jacob.com Dispatch ComThread))" it just hangs.

Any help is greatly appreciated.

JACOB: http://sourceforge.net/projects/jacob-project/

Clojure Box: http://clojure.bighugh.com/

Was it helpful?

Solution

You also need to copy swank-clojure.jar to ~/clojure.

  1. Put this in ~/.emacs:

    (setq swank-clojure-library-paths '("c:\dev\dlls"))

  2. Create the directory C:\dev\dlls.

  3. Copy the Jacob DLLs to C:\dev\dlls.
  4. Create the directory ~/clojure.
  5. Copy clojure.jar, clojure-contrib.jar and swank-clojure.jar to ~/clojure.
  6. Start ClojureBox.

Versions:

  • ClojureBox 1.2.0
  • jacob-1.15-M4
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top