Hi! I use clojure from java. And I don't know how to send params to clojure....
I use "Vijual Graph Layout Library for Clojure" (
https://github.com/drcode/vijual). Some methods has params, for example:
((draw-directed-graph [["AFn" "Obj"] ["AFn" "IFn"] ["AFn" "Serializable"] ["AFunction" "AFn"]...
or
(draw-graph-image [[:to-cellar :living-room] [:living- room :kitchen] ...blah blah
_______________________________________________________________________
My java code:
public static void main(String args[]) throws Exception {
BufferedReader br = new BufferedReader(new FileReader(new File("res/test.clj")));
StringBuilder sb = new StringBuilder();
String line;
while((line = br.readLine())!= null){
sb.append(line);
sb.append("\n");
}
Compiler.load(new StringReader(sb.toString()));
RT.var("vijual", "func").invoke("I am here!");
Var draw = RT.var("vijual", "draw-tree-image");
Var save = RT.var("vijual", "save-image");
// params should be here!
draw.invoke(myParams); //this is trouble...
save.invoke(new BufferedImage(500,500,1), "
C:/AAAAAA");
}
Can you help me?
maybe I should to use PersistentVector and Keyword classes? if it's true, can you give me a short example?