Created
November 23, 2009 00:49
-
-
Save ato/240818 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; | |
| ;; 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