Jar is a convenient way to use java, as every class can be included in one jar.
I use antlr as follows, and it calls jar using -jar option.
java -jar $ANTLRDIR/antlr-3.2.jar ANTLR_CODE.g
And, this is the command that calls clojure. Instead of calling clojure.jar using -jar option. It's in the -cp, and calls some 'function'.
java -cp $CLOJURE_JAR:$CLASSPATH clojure.lang.Script CLOJURE_CODE.clj
Questions
- What's the magic behind this method? What's 'clojure.lang.Script'?
- Can the antlr be called with the same way? If so what's the name that should be used (something like clojure.lang.Script)?
- How about the jar file made with other languages : clojure/scala? How do I know the name that should be called?
- What's the difference between the two methods? Pros and cons?