Reputation: 11734
I have this simple Java source:
class HelloJava {
public static String greetMe() {
return "Hello, this is Java calling!";
}
}
which I compile down into a class file called HelloJava.class
HelloWorld.class is in the same directory that I launch the Repl from.
How can I now call HelloJava.greetMe() in the Clojure REPL?
Upvotes: 0
Views: 320
Reputation: 20194
Static methods are accessed via Class/method, and like most things in Clojure, are invoked via wrapping in parens:
(import org.user3231690.HelloJava)
(HelloJava/greetMe)
Upvotes: 1