I'm new to clojure, and I'm trying to figure out how to integrate it
into a somewhat large Java codebase. At a particular point the the
program's execution, I'd like to spin up a thread with a swank server
on it, but the following code doesn't seem to work. Can I get a
pointer from the experienced hands as to what I'm doing wrong, or
where to look for more clues?
            RT.loadResourceScript("swank/loader.clj");
            Var swank = RT.var("swank.loader", "init");
            Object result = swank.invoke();
            RT.loadResourceScript("swank/swank.clj");
            // main.legacy_repl
(null);                                     // A
            swank = RT.var("swank.swank", "start-server");
            result = swank.invoke("/dev/
null");                       // B

Line B throws "java.lang.IllegalStateException: Var clojure.core/*3 is
unbound."

If I uncomment line A, I get a repl at which I can immediately do
   (swank.swank/start-server "/dev/null")
and get a running swank.

I'm stumped as to why that var can be resolved in one situation but
not the other. Do I need to do additional things to set up the full
clojure environment before that invocation?

Thanks,
Thom


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to