Tassilo Horn <[email protected]> writes:
>> Take a look at this blog post:
>> http://avodonosov.blogspot.com/2008/12/simpler-clojureslime-embedding.html
>>
>> I think you will find it useful.
>
> Cool, but I had to modify it a bit to get it working:
>
> (add-classpath "file:///home/horn/repos/el/swank-clojure/")
> (require 'swank.swank 'clojure.main)
> (clojure.main/with-bindings
> (swank.swank/ignore-protocol-version "2008-11-23")
> (swank.swank/start-server "nul" :encoding "utf-8-unix" :port 7777))
Ok, so now I can start a swank server from Java and can connect to it
using SLIME. But now comes the next problem: How do I access the
objects of the running java app?
Basically all our apps operate on a graph, and that's what I'd like to
have accessible from clojure. So I want something like that:
...
Graph g = GraphIO.loadGraphFromFile("foo.tg");
defInClojure("graph", g);
...
so that from inside SLIME I have a variable graph holding a reference to
the graph g from the java app. If possible, how would I do this?
Another approach would be to find the object of interest from inside
SLIME. Something like (find-objects-of-class foo.bar.Graph) returning a
seq of all graphs. Is something like that available?
Bye,
Tassilo
--
Chuck Norris once ate four 30lb bowling balls without chewing.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---