Skip to content

Instantly share code, notes, and snippets.

@ato
Created November 23, 2009 00:49
Show Gist options
  • Select an option

  • Save ato/240818 to your computer and use it in GitHub Desktop.

Select an option

Save ato/240818 to your computer and use it in GitHub Desktop.
;;
;; My outer Clojure is 1.1.0-alpha
;;
(let [loader (URLClassLoader.
(into-array
URL [(URL. "file:///usr/share/java/clojure-1.0.0.jar")])
(.getParent (ClassLoader/getSystemClassLoader)))
nested-rt (.loadClass loader "clojure.lang.RT")
get-var (.getMethod nested-rt "var" (into-array Class [String String]))]
(.deref (.invoke get-var nil (to-array ["clojure.core"
"*clojure-version*"]))))
=> #<PersistentArrayMap {:major 1, :minor 0, :incremental 0, :qualifier ""}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment