views:

443

answers:

0

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/