I am following the examples on the docs and am stuck at Calling Java Methods. When I run
[:find ?k ?v
:where [(System/getProperties) [[?k ?v]]]]
I get a FileNotFoundException Could not locate System__init.class or System.clj on classpath. clojure.lang.RT.load (RT.java:463).
When I run (System/getProperties) in the REPL, I get results.
{"java.runtime.name" "OpenJDK Runtime Environment",
"sun.boot.library.path" "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64",
"java.vm.version" "25.181-b13",
...}
I tried running the snippet with a fully qualified class name (java.lang.System/getProperties) and I still get the error.
(d/q '[:find ?k ?v
:where
[(java.lang.System/getProperties) [[?k ?v]]]
[(.endsWith ^String ?k "version")]])
Clojure Version: 1.9.0
Datomic Version: [com.datomic/datomic-pro "0.9.5703"] (on-prem)
Any ideas what I need to do to get this working? I am developing and running the REPL using IntelliJ.
(java.lang.System/getProperties)? Also, make sure to tell us what version / platform of Datomic you're running. - Valentin WaeselynckFileNotFoundException Could not locate java/lang/System__init.class or java/lang/System.clj on classpath. clojure.lang.RT.load (RT.java:463). Let me get the version details for you. - Clarice Bouwer