if you must dynamic load it. you can do it from a file and
use the clojure runtime

import clojure.lang.RT;
import clojure.lang.Var;

full code example at

http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Invoking_Clojure_from_Java


On Wed, Sep 1, 2010 at 10:51 PM, Sean Corfield <[email protected]> wrote:
> Let's suppose I have a Java application (or some other language
> running on the JVM). I want to write some logic in Clojure and call it
> from Java.
>
> I know that I can compile Clojure code to .class files. I've used lein
> to create a JAR that I've deployed as part of a Java app and I've
> successfully called compiled Clojure from a Java app.
>
> But now I want to deploy Clojure source files and be able to load and
> run those from inside a Java app. What's the easiest way?
>
> (background: I'm actually using a dynamic scripting language to build
> web apps where I can just reload the browser and the script code is
> automatically recompiled so my dev cycle is: edit-reload-test with no
> compile / build process - and I want to add Clojure to that mix)


-- 
Omnem crede diem tibi diluxisse supremum.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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

Reply via email to